The English used in this article or section may not be easy for everybody to understand. (December 2011)
Yabasic (Yet Another BASIC) is an interpreter program for a version of BASIC. BASIC is a programming language. BASIC was designed by John George Kemeny and Thomas Kurtz, in 1964. However, Yabasic was born in 1995, 32 years later. Pedro Sá and Thomas Larsen are now developing version 3 of Yabasic. Yasbic is very compact at about 250 kilobytes total length.
How it works[change | change source]
To write something on the monitor, like Hello World, type print then "YOUR TEXT HERE".
Print "Hello World"
Study this bit of code:
10 beep 20 wait 1 30 goto 10
The result of this code is:
An audible beep is generated
The program waits for 1 second before going onto the next instruction
It then goes back to the start of the program creating an infinite loop.
This programming language can also be used to create rather complex programs such as one that calculates 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
The "input" command asks the user to input a value which in this case is number that tells the program what number to stop finding prime numbers at.
commands create a loop that can be repeated infinitely.
commands hold instructions as to what the program is to do while in the loop.
Related pages[change | change source]
References[change | change source]
- Tutorial on how to create UDTs in Yabasic 3 Archived 2011-09-10 at the Wayback Machine www.basicprogramming.org
- Yabasic::Dev Article Future of Yabasic Archived 2011-09-10 at the Wayback Machine www.basicprogramming.org
- Announcement: Yabasic 3 beta release (2.9.5) Archived 2011-10-02 at the Wayback Machine Thomas H. Larsen, via basicprogramming.org forum, 26 November 2009, forum.basicprogramming.org
- Wiki of the developer team for Yabasic 3 Archived 2011-09-10 at the Wayback Machine www.basicprogramming.org
Other websites[change | change source]
- Official Yabasic website — downloads and documentation for Yabasic 2.763.
- Yabasic 3 website Archived 2011-10-02 at the Wayback Machine - downloads and documentation for the Version 3 interpreter.
- Yabasic manual — documentation for the interpreter.
- YAB interpreter — BeOS/Haiku version of Yabasic.
- Yabsic PS2 — site about the PS2 version.
- Small collection of Yabasic programs Archived 2010-03-24 at the Wayback Machine.
- Official website of flyab.