Update README.md

This commit is contained in:
Wang Renxin 2014-12-04 15:38:06 +08:00
parent 4e30c1f070
commit b5dc8b0796

View File

@ -1,28 +1,43 @@
![](resource/icon.ico)
Copyright (C) 2011 - 2014 W. Renxin
## Introduction ## Introduction
MY-BASIC is a tiny cross-platform easy extendable BASIC interpreter written MY-BASIC is a tiny cross-platform easy extendable BASIC interpreter written in pure C with about 6000 lines of source code. Its grammar is similar to structured BASIC in early era, but without line number. It is aimed to be either an embeddable scripting language or a standalone interpreter. The core is pretty light; all in a C source file and an associated header file. You can combine MY-BASIC with an existing C/C++/Objective-C project easily, scripting driven can make your projects more powerful, elegant and neat.
in pure C with about 5000 lines of source code. Its grammar is similar
to structured BASIC in early era, but without line number. It is aimed to
be either an embeddable scripting language or a standalone interpreter. The
core is pretty light; all in a C source file and an associated header file.
You can combine MY-BASIC with an existing C / C++ / Objective-C project
easily, that can make them more powerful.
## Main features ## Main features
* Written in clean ANSI C, source portable * Written in clean ANSI C, source code portable
* Most GW-BASIC like syntax, but without line numbers * Most GW-BASIC like syntax, but without line numbers
* Small and fast * Small (binary less than 80KB, memory less than 500KB) and fast
* Not case-sensitive * Case-insensitive tokens
* Integer/float point/string/boolean/array data types support * Integer/float point/string/boolean/array data types support
* IF - THEN - ELSE support * `IF-THEN-ELSE` support
* FOR - TO - STEP - NEXT / WHILE - WEND / DO - UNTIL support * `FOR-TO-STEP-NEXT/WHILE-WEND/DO-UNTIL` support
* GOTO / GOSUB - RETURN support * `GOTO/GOSUB-RETURN` support
* Numeric functions * Numeric functions
* String functions * String functions
* Easy to embed into C/C++/Objective-C projects * Easy to embed into C/C++/Objective-C projects
* High expansibility * High expansibility, easy to use APIs, easy to write customized scripting interfaces
* It is free * It is free
[FAQ](https://github.com/paladin-t/my_basic/wiki/FAQ) ## Installation
### Use standalone interpreter binary
This repository contains precompiled binaries for [Win32](output/my_basic.exe) and [MacOS](output/my_basic_mac), it's efficient to download it and have a first impressive playground.
To compile an interpreter binary for your own platform, please see the steps as follow.
* Retrieve `core` and `shell` folders
* Setup your compile context
* Use your compiler to process `core/my_basic.c` and `shell/main.c`
### Combine with exist projects
MY-BASIC is cleanly writen in a single C source file and an associated header file. Just copy `my_basic.c` and `my_basic.h` to your project folder and add them to a build configuration.
For more details about using MY-BASIC with exist projects, please see [MY-BASIC Quick Reference](MY-BASIC%20Quick%20Reference.pdf).
## [FAQ](https://github.com/paladin-t/my_basic/wiki/FAQ)
-----
You can support MY-BASIC development with a donation: You can support MY-BASIC development with a donation:
<br>
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hellotony521%40gmail%2ecom&lc=US&item_name=my-basic&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest) [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hellotony521%40gmail%2ecom&lc=US&item_name=my-basic&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest)