Yabasic facts for kids
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
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.
commands tell the program to look for something and if the thing it is looking for is there then it reports back that it is there.
Yabasic Facts for Kids. Kiddle Encyclopedia.