en:programsyntax [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

en:programsyntax

## 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.txt · Last modified: 2014/02/06 11:32 by admin