Yabasic

Yabasic

Infobox_Software
name = Yabasic


caption = Yabasic running an implementation of SameGame.
developer = Marc-Oliver Ihm
latest_release_version = 2.763 - Final
latest_release_date = August, 2007
operating_system = Windows, Unix
genre = Programming
license = GNU General Public License, Artistic License
website = [http://www.yabasic.de/ http://www.yabasic.de/]

Yabasic (Yet Another BASIC) is a free and open source BASIC interpreter for Windows and Unix platforms. [" [http://www.yabasic.de Yabasic] ", the official website of Yabasic. 20 January] Yabasic was developed by Marc-Oliver Ihm. The Yabasic interpreter is relatively small in file size at about 250 kilobytes.

History

Yabasic started as a very simple interpreter around May 1995. Although it was released as version 1.0 it lacked many features like arrays and loops. A year later Yabasic was ported to the Win32 platform, creating version 2.0. Another big improvement was the addition of subroutines and libraries in version 2.57, allowing anyone to add their own functions to the language. ["Yabasic". Official website of Yabasic. Thursday 25 January http://www.yabasic.de.]

Since then, Ihm has stated that "probably (he) will not develop Yabasic any further (beyond version 2.763) within the foreseeable future", due to a lack of time. Yet, there are efforts from other developers to pick up the project which have already resulted in minor bugfixes. [ [http://www.basicprogramming.org/wiki/index.php?title=Yabasic::Dev_Article_Future_of_Yabasic Yabasic::Dev Article Future of Yabasic - Basicprogramming.org ] ] The aim is to completely rewrite the interpreter before expanding functionality.

Features

Yabasic can draw simple line graphics in colour as of version 2.760. As well as "conventional" features, Yabasic offers structured programming (various block structures, named subroutines with return values and code modules with separate namespaces). On the other hand, composite data structures are missing. Yabasic also offers the possibility to create a graphical user interface based on the GTK library. Passing of arguments is always by value, except for arrays, which are always by reference.

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 programs can be self-modifying (see section below) by turning string variables into blocks of code through the "compile" command.

Another useful feature is the "bind" instruction, allowing the creation of standalone executables by linking the interpreter to the source code into a single file.

Execution speed of the interpreter is reasonably high.who

A version of Yabasic is available for Sony's PlayStation 2. It comes free with the console in Europe and Australasia. The demo disc containing the Yabasic interpreter is a PAL disc and is not intended for the United States or Japanese PlayStation 2 markets. It is recommended to have an additional USB-compatible keyboard for the PlayStation version of Yabasic because programming with a gamepad is rather impractical. Yabasic programs created on a PlayStation can be stored on memory cards for later retrieval or swapping with friends.

Examples

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

Adding code during execution

String variables can be "compiled" into program code at runtime.

For example, the sequence

x$= "sub printme() print "Hello world!" end sub" compile(x$)

would create a new procedure,

sub printme() print "Hello world!" end sub

This procedure can then be invoked from this point on in either the 'traditional' way,

printme()

or via the slightly more clever:

y$= "printme()" execute(y$)

Modifications

Because Yabasic is open source and dual-licensed under both the GPL and Artistic License, anyone can make their own versions and modifications of Yabasic. There is a version of Yabasic called "Flyab", which is a port of Yabasic to the Fltk toolkit. 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. ["team maui". Official website of flyab, 30 January http://team-maui.org/.]

Sony also packaged a version of Yabasic for the PlayStation 2 with all PS2 consoles in PAL territories. It is widely rumoredattribution needed that this was in order to try and class the games console as a home computer in order to save money on import tax.

References

External links

* [http://www.yabasic.de/ Official Yabasic website] - downloads and documentation for Yabasic.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • YaBasic — Entwickler u.a. Pedro Sá und Thomas Larsen[1] Aktuelle Version 2.9.15 (10. Juni 2010) Betriebssystem GNU/Linux, Windows …   Deutsch Wikipedia

  • Yabasic — YaBasic, qui signifie Yet Another Basic, est un interprète du langage BASIC pour les plateformes Unix, Windows et PlayStation 2. Similaire au Commodore BASIC du Commodore 64, il supporte le mode graphique couleur et a des possibilités d… …   Wikipédia en Français

  • YaBasic — YaBasic, qui signifie Yet Another Basic, est un interprète du langage BASIC pour les plateformes Unix, Windows et PlayStation 2. Similaire au Commodore BASIC du Commodore 64, il supporte le mode graphique couleur et a des possibilités d… …   Wikipédia en Français

  • YaBasic — es una implementación de lenguaje Basic para plataformas Windows, Linux, Unix, Mac OS X y PlayStation 2. Es un BASIC bastante clásico, posee las funciones básicas para programación en modo texto, incluso permite programación estructurada y… …   Wikipedia Español

  • Yabasic interpreter — YaBasic YaBasic, qui signifie Yet Another Basic, est un interprète du langage BASIC pour les plateformes Unix, Windows et PlayStation 2. Similaire au Commodore BASIC du Commodore 64, il supporte le mode graphique couleur et a des possibilités d… …   Wikipédia en Français

  • YaBasic — Implementación de lenguaje Basic para plataformas windows y Linux. Es un BASIC bastante clásico, posee las funciones básicas para programación en modo texto, incluso permite programación estructurada y archivos con librería de funciones. Esta muy …   Enciclopedia Universal

  • Net Yaroze — System Requirements Requirements PC Operating system IBM or Macintosh CPU 66Mhz Memory 4Mb Hard drive space 10Mb Graphics …   Wikipedia

  • List of BASIC dialects by platform — List of BASIC dialects by platform: This is a list of dialects of the BASIC computer programming language, sorted into groups for better conceptual organization.There is also an alphabetical list of BASIC dialects. These two lists should contain… …   Wikipedia

  • Basicdialekt — Aufgrund der seit Jahrzehnten bestehenden Popularität von BASIC existieren zahlreiche BASIC Implementierungen auf einer Vielzahl von Plattformen. Entsprechend den sehr unterschiedlichen Umgebungen und Einsatzzwecken wurde eine hohe Zahl von… …   Deutsch Wikipedia

  • Basicdialekte — Aufgrund der seit Jahrzehnten bestehenden Popularität von BASIC existieren zahlreiche BASIC Implementierungen auf einer Vielzahl von Plattformen. Entsprechend den sehr unterschiedlichen Umgebungen und Einsatzzwecken wurde eine hohe Zahl von… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”