User Tools

Site Tools


en:programsyntax

This is an old revision of the document!


Program Syntax

BASIC-256 programs consist of a series of statements separated by newlines, which are executed in order. A line may optional begin with a label followed without a space with a colon to be used as a destination of a goto, gosub, or onerror.

Multiple statements may be included on a single line by separating then with a : (colon). Special care should be taken when including if/then statements in a compound line:

The following is a sample program that shows single line statements, compound statements, and use of a label.

print "hello ";
gosub world
end

world: ### print out world
print "w";
print "o";: print "r";: print chr(asc("a")+11);
print right('Dd',1)
return
en/programsyntax.1451713309.txt.gz · Last modified: 2020/02/28 10:46 (external edit)