From Seo Wiki - Search Engine Optimization and Programming Languages
Yabasic running an implementation of SameGame.
|Developer(s)||Marc-Oliver Ihm (ret.)|
|Stable release||2.763 / August, 2007|
|Operating system||Windows, Unix|
|License||GNU General Public License version 3 or later|
|Website||www.yabasic.de - original version to V 2.763|
yabasic.basicprogramming.org - version 3
Yabasic (Yet Another BASIC) is a free and open source BASIC interpreter for Windows and Unix platforms. Yabasic was originally developed by Marc-Oliver Ihm, who released the last stable version 2.763 in 2005. Version 3 is developed by a team centered around Pedro Sá and Thomas Larsen. The Yabasic interpreter is quite compact at about 250 kilobytes total.
Yabasic started as a very simple interpreter around May 1995. When it was released as version 1.0 it lacked many features like arrays and loops. In summer 1996, Yabasic was ported to the Win32 platform (Version 2.0). Further improvements were the addition of subroutines and libraries (summer 1999, version 2.57), and graphic capabilities.
In August 2007, Ihm stated that "probably (he) will not develop Yabasic any further (beyond version 2.763) within the foreseeable future", due to a lack of time. Sá and Larsen have revived the project, and currently work on Yabasic 3, and on releasing bugfixes for version 2.763. Several beta releases of version 3 have been released since December 2009.
- No line numbers,
- Line graphics in colour,
- Structured programming—various block structures, named subroutines with local variables and return values,
- Code modules/libraries with separate namespaces (On the other hand, composite data structures are missing),
- Option to use a graphical user interface based on the GTK library,
- Self-modifying code (see section below)
- "Binding" a Yabasic program to the interpreter, creating a standalone executable in a single file.
The interpreter is very lenient in syntactical matters—for example, both color and colour are legal variants for the same command. Likewise, there are a number of different versions for if and for constructs, giving the programmer freedom of choice in their design.
Yabasic's idiosyncratic way of accessing system variables with peek and poke-commands has been dropped in favour of reserved variable names. Old-style BASIC control flow features (goto, gosub, labels) are no longer supported. Declaration of variables prior to use can optionally be enforced.
The classic Hello World program looks like this in Yabasic,
print "Hello World"
The following example will calculate prime numbers,
print "This program will calculate the prime numbers below the limit" input "limit: " limit n=2 do for i=2 to sqrt(n) if (frac(n/i)=0) then notprime=1 break endif next i if notprime<>1 then print n endif notprime=0 n=n+1 if n>limit break loop
For example, the sequence
x$= "sub printme() \n print \"Hello world!\" \n end sub" compile(x$)
would create a new procedure,
sub printme() print "Hello world!" end sub
while the program is running. This procedure can from this point on be invoked in either the 'traditional' way,
or via the slightly more clever:
y$= "printme()" execute(y$)
A port of Yabasic to the Fltk toolkit called "Flyab" is currently under development. While "Flyab" only runs on BeOS at present, ports for Windows, Mac OS X, and Linux are planned. Flyab adds the ability to Yabasic to create native graphical user interfaces on all supported platforms. (As of November 2008, the project appears to be halted.)
Sony also packaged a version of Yabasic for the PlayStation 2 with all PS2 consoles in PAL territories.
- ↑ 1.0 1.1 Official Yabasic website www.yabasic.de
- ↑ Wiki of the developer team for Yabasic 3 www.basicprogramming.org
- ↑ Yabasic::Dev Article Future of Yabasic www.basicprogramming.org
- ↑ Announcement: Yabasic 3 beta release (2.9.5) Thomas H. Larsen, via basicprogramming.org forum, 26/11/2009, forum.basicprogramming.org
- ↑ Tutorial on how to create UDTs in Yabasic 3 www.basicprogramming.org
- ↑ Official website of flyab team-maui.org
- Official Yabasic website — downloads and documentation for Yabasic 2.763.
- Yabasic 3 website - downloads and documentation for the Version 3 interpreter.
- Yabasic manual — documentation for the interpreter.
- YAB interpreter — BeOS version of Yabasic.
- Yabsic PS2 — site about the PS2 version.
- Small collection of Yabasic programs.de:YaBasic