diff --git a/LICENSE b/LICENSE index d87c640..994b553 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (C) 2011 - 2020 Wang Renxin +Copyright (C) 2011 - 2021 Tony Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/MY-BASIC Quick Reference.pdf b/MY-BASIC Quick Reference.pdf index 250759b..a16187f 100644 Binary files a/MY-BASIC Quick Reference.pdf and b/MY-BASIC Quick Reference.pdf differ diff --git a/README.md b/README.md index b59b74a..771397f 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ |_|_|_| |_| |_____|__|__|_____|_____|_____| ~~~~~~~~~~ -**Copyright (C) 2011 - 2020 Wang Renxin** +**Copyright (C) 2011 - 2021 Tony Wang** [![Build status](https://travis-ci.org/paladin-t/my_basic.svg?branch=master)](https://travis-ci.org/paladin-t/my_basic) [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) @@ -24,7 +24,7 @@ ## Introduction -MY-BASIC is a lightweight BASIC interpreter written in standard C in dual files. It's aimed to be embeddable, extendable and portable. It is a dynamic typed programming language, reserves structured syntax, supports a style of [prototype-based programming](https://en.wikipedia.org/wiki/Prototype-based_programming) (OOP), also implements a functional paradigm by [lambda abstraction](https://en.wikipedia.org/wiki/Anonymous_function). The core is written in a C source file and an associated header file. It's easy to either use it as a standalone interpreter or embed it with existing projects in C, C++, Java, Objective-C, Swift, C#, etc. and totally customizable by adding your own scripting interfaces. +MY-BASIC is a lightweight BASIC interpreter written in standard C in dual files. It aims to be embeddable, extendable and portable. It is a dynamic typed programming language, reserves structured syntax, supports a style of [prototype-based programming](https://en.wikipedia.org/wiki/Prototype-based_programming) (OOP), also implements a functional paradigm by [lambda abstraction](https://en.wikipedia.org/wiki/Anonymous_function). The core is written in a C source file and an associated header file. It's easy to either use it as a standalone interpreter or embed it with existing projects in C, C++, Java, Objective-C, Swift, C#, etc. and totally customizable by adding your own scripting interface. ## Main features @@ -80,36 +80,36 @@ Read the [MY-BASIC Quick Reference](https://paladin-t.github.io/my_basic/MY-BASI This repository contains precompiled binaries for [Windows](output/my_basic.exe) and [macOS](output/my_basic_mac), the easiest way is to download to get a direct playground. Or you can make a build by: -* Using the Visual Studio workspace `my_basic.sln` on Windows to build an executable -* Using the Xcode workspace `my_basic_mac.xcodeproj` on macOS to build an executable -* Using the `makefile` on *nix OS to build an executable +* Using the Visual Studio solution `my_basic.sln` for Windows build +* Using the Xcode workspace `my_basic_mac.xcodeproj` for macOS build +* Using the `makefile` for *nix build -Follow these steps to compile an interpreter binary manually for any platform: +Follow these steps to compile an interpreter binary manually for other platform: -1. Retrieve everything under the [`core`](core) and [`shell`](shell) folders for a minimum build +1. Retrieve everything under the [`core`](core) and [`shell`](shell) folders for a minimum setup 2. Setup your toolchain for compiling and linking -3. Compile [`core/my_basic.c`](core/my_basic.c) and [`shell/main.c`](shell/main.c), with both including [`core/my_basic.h`](core/my_basic.h); then link up an executable +3. Compile [`core/my_basic.c`](core/my_basic.c) and [`shell/main.c`](shell/main.c), while both includes [`core/my_basic.h`](core/my_basic.h); then link up an executable The standalone interpreter supports three running modes: * Execute the binary without arguments to use the interactive mode - * Type "HELP" and hint Enter to get usages of it + * Type "HELP" and hint Enter to see usages * Pass a file to the binary to load and run that BASIC source code -* Pass an argument `-e` followed with an expression to evaluate and print instantly as a simple calculator, eg. `-e "2 * (3 + 4)"` +* Pass an argument `-e` followed with an expression to evaluate and print instantly as a simple calculator, eg. `-e "22 / 7"` ### Combining with existing projects -Just copy [`core/my_basic.c`](core/my_basic.c) and [`core/my_basic.h`](core/my_basic.h) to your project and add them to the build configuration. You can [link with MY-BASIC as a lib](https://github.com/paladin-t/my_basic/wiki/Linking-with-MY_BASIC) as well. +Just copy [`core/my_basic.c`](core/my_basic.c) and [`core/my_basic.h`](core/my_basic.h) to your project and add them to the build pipeline. You can [link with MY-BASIC as a lib](https://github.com/paladin-t/my_basic/wiki/Linking-with-MY_BASIC) as well. For details about using MY-BASIC after integration, see [MY-BASIC Quick Reference](https://paladin-t.github.io/my_basic/MY-BASIC%20Quick%20Reference.pdf) and read the [Wiki](#wiki) pages. ## [Interpreter workflow diagram](https://github.com/paladin-t/my_basic/wiki/Interpreter-workflow-diagram) -It's recommended to know the basic principle of MY-BASIC before customizing; nothing's better than a workflow diagram to get a first image. +MY-BASIC's workflow diagram can be concluded in a single image. ![](https://github.com/paladin-t/my_basic/wiki/img/workflow.png) -A simple setup as follow: +A simple setup: ~~~~~~~~~~c #include "my_basic.h" @@ -130,7 +130,7 @@ int main() { ## [Wiki](https://github.com/paladin-t/my_basic/wiki) -The manual explains most of the fundamental topics, however it doesn't cover everything; read the [Wiki](https://github.com/paladin-t/my_basic/wiki) as supplement instructions, such as machinism behind MY-BASIC, efficient practice, etc: +The manual explains most of the fundamental topics, however it doesn't cover everything; read the [Wiki](https://github.com/paladin-t/my_basic/wiki) for supplements, like machinism behind MY-BASIC, efficient practice, etc: * Principles * [Passes](https://github.com/paladin-t/my_basic/wiki/Passes) diff --git a/core/my_basic.c b/core/my_basic.c index 6e86727..bd3a82c 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2020 Wang Renxin +** Copyright (C) 2011 - 2021 Tony Wang ** ** Permission is hereby granted, free of charge, to any person obtaining a copy of ** this software and associated documentation files (the "Software"), to deal in diff --git a/core/my_basic.h b/core/my_basic.h index ff74ec6..8c6eb75 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2020 Wang Renxin +** Copyright (C) 2011 - 2021 Tony Wang ** ** Permission is hereby granted, free of charge, to any person obtaining a copy of ** this software and associated documentation files (the "Software"), to deal in diff --git a/donate.html b/donate.html index 6144dd7..751f365 100644 --- a/donate.html +++ b/donate.html @@ -1,120 +1,139 @@ - - - - Donate to MY-BASIC - - + + + + Donate to MY-BASIC + + + +
+

+ BACK TO MY-BASIC +

- -
-

- BACK TO MY-BASIC -

+

Donate to MY-BASIC

-

Donate to MY-BASIC

+

List of Donors

+

+ Here is the list of some of the people who have kindly sent donation for MY-BASIC development. + I greatly appreciate all the donation that has been made. +

+

+

+

+

+ The list is ordered by most recent. +

+

+ Please send me a message if you think your name should be listed here, or do not want your name to be listed. +

+
-

List of Donors

-

- Here is the list of some of the people who have kindly sent donation for MY-BASIC development. - I greatly appreciate all the donation that has been made. -

-

-

-

-

- The list is ordered by most recent. -

-

- Please send me a message if you think your name should be listed here, or do not want your name to be listed. -

-
+

Donate

+

+ Thank you for choosing MY-BASIC. Your support is my motivation to make MY-BASIC better. + It's totally free to use code/binary/document in the MY-BASIC repository for both commercial and noncommercial purpose under the MIT license. + However, you can support MY-BASIC development with a donation. +

-

Donate

-

- Thank you for choosing MY-BASIC. Your support is my motivation to make MY-BASIC better. - It's totally free to use code/binary/document in the MY-BASIC repository for both commercial and noncommercial purpose under the MIT license. - However, you can support MY-BASIC development with a donation. -

+
+ + + + + + + + + +
Donate with
+ + + +
+
-
- - - - -
Donate with
- - - -
-
+

Questions

+

+ Q: Why it's a "Pay Now" instead of "Donate" button? +

+

+ A: "Donate" button is no longer usable with an account from my region, according to PayPal's latest policy. + The only option PayPal offered for me is to use this "Pay Now" instead. + No worry, it's similar and secure. +

+

+ Q: Do I have to sign up before making donation? +

+

+ A: No signing up is required to donate with PayPal. + PayPal accepts direct transaction with regular credit cards and debit cards. +

+

+ Q: How can I choose a different amount? +

+

+ A: PayPal's "Pay Now" doesn't support customized price by you. + You may choose a base donation and change the quantity for an approximate expected amount, if it's not on the payment option list. +

-

Questions

-

- Q: Why it's a "Pay Now" instead of "Donate" button? -

-

- A: "Donate" button is no longer usable with an account from my region, according to PayPal's latest policy. - The only option PayPal offered for me is to use this "Pay Now" instead. - Don't worry, it's similar and secure. -

-

- Q: Do I have to sign up before making donation? -

-

- A: No signing up is required to donate with PayPal. - PayPal accepts direct transaction with common credit cards and debit cards. -

-

- Q: How should I choose a different amount? -

-

- A: PayPal's "Pay Now" doesn't support customized price by you. - You may choose a base donation number and change the quantity for an approximate expected amount, if it's not on the payment option list. -

+

+ BACK TO MY-BASIC +

-

- BACK TO MY-BASIC -

-
-

Copyright (C) 2011 - 2020 Wang Renxin. All rights reserved.

- - +
+

Copyright (C) 2011 - 2021 Tony Wang, all rights reserved

+
+ + \ No newline at end of file diff --git a/my_basic_mac.xcodeproj/project.pbxproj b/my_basic_mac.xcodeproj/project.pbxproj index e6f05d7..19c59e7 100644 --- a/my_basic_mac.xcodeproj/project.pbxproj +++ b/my_basic_mac.xcodeproj/project.pbxproj @@ -102,7 +102,7 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1000; - ORGANIZATIONNAME = "Wang Renxin"; + ORGANIZATIONNAME = "Tony Wang"; TargetAttributes = { 03F4D7291A1D0081009F920C = { CreatedOnToolsVersion = 6.1; diff --git a/output/README.md b/output/README.md index 9ea7aeb..a288c29 100644 --- a/output/README.md +++ b/output/README.md @@ -2,8 +2,8 @@ **my_basic.exe** -Compiled with "Visual C++ 2015", as x86 executable. +Compiled with Visual C++ 2015, as x86 executable. **my_basic_mac** -Compiled with "Xcode 9", as x86-64 executable. +Compiled with Xcode 10, as x86-64 executable. diff --git a/output/my_basic.exe b/output/my_basic.exe index fa850af..e131597 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ diff --git a/output/my_basic_mac b/output/my_basic_mac index 6ab50a9..203996a 100755 Binary files a/output/my_basic_mac and b/output/my_basic_mac differ diff --git a/resource/my_basic.rc b/resource/my_basic.rc index 4aa7eac..9982c21 100755 --- a/resource/my_basic.rc +++ b/resource/my_basic.rc @@ -53,11 +53,11 @@ BLOCK "080404b0" BEGIN VALUE "Comments", "For more information, see https://github.com/paladin-t/my_basic/." - VALUE "CompanyName", "Wang Renxin" + VALUE "CompanyName", "Tony Wang" VALUE "FileDescription", "MY-BASIC Interpreter for Windows" VALUE "FileVersion", "1, 2, 0, 0" VALUE "InternalName", "my_basic" - VALUE "LegalCopyright", "Copyright (C) 2011 - 2020 Wang Renxin" + VALUE "LegalCopyright", "Copyright (C) 2011 - 2021 Tony Wang" VALUE "LegalTrademarks", "MY-BASIC" VALUE "OriginalFilename", "my_basic.exe" VALUE "ProductName", "MY-BASIC" diff --git a/shell/main.c b/shell/main.c index a95184d..2a0c009 100755 --- a/shell/main.c +++ b/shell/main.c @@ -3,7 +3,7 @@ ** ** For the latest info, see https://github.com/paladin-t/my_basic/ ** -** Copyright (C) 2011 - 2020 Wang Renxin +** Copyright (C) 2011 - 2021 Tony Wang ** ** Permission is hereby granted, free of charge, to any person obtaining a copy of ** this software and associated documentation files (the "Software"), to deal in @@ -979,7 +979,7 @@ static void _list_directory(const char* path) { static void _show_tip(void) { _printf("MY-BASIC Interpreter Shell - %s\n", mb_ver_string()); - _printf("Copyright (C) 2011 - 2020 Wang Renxin. All Rights Reserved.\n"); + _printf("Copyright (C) 2011 - 2021 Tony Wang. All Rights Reserved.\n"); _printf("For more information, see https://github.com/paladin-t/my_basic/.\n"); _printf("Input HELP and hint enter to view help information.\n"); } @@ -999,19 +999,19 @@ static void _show_help(void) { _printf("\n"); _printf("Interactive commands:\n"); _printf(" HELP - View help information\n"); - _printf(" CLS - Clear screen\n"); - _printf(" NEW - Clear current program\n"); - _printf(" RUN - Run current program\n"); - _printf(" BYE - Quit interpreter\n"); - _printf(" LIST - List current program\n"); + _printf(" CLS - Clear the screen\n"); + _printf(" NEW - Clear the current program\n"); + _printf(" RUN - Run the current program\n"); + _printf(" BYE - Quit the interpreter\n"); + _printf(" LIST - List the current program\n"); _printf(" Usage: LIST [l [n]], l is start line number, n is line count\n"); _printf(" EDIT - Edit (modify/insert/remove) a line in current program\n"); _printf(" Usage: EDIT n, n is line number\n"); _printf(" EDIT -i n, insert a line before a given line\n"); _printf(" EDIT -r n, remove a line\n"); - _printf(" LOAD - Load a file as current program\n"); + _printf(" LOAD - Load a file to the current program\n"); _printf(" Usage: LOAD *.*\n"); - _printf(" SAVE - Save current program to a file\n"); + _printf(" SAVE - Save the current program to a file\n"); _printf(" Usage: SAVE *.*\n"); _printf(" KILL - Delete a file\n"); _printf(" Usage: KILL *.*\n");