# unnamed language HOME

this language as no name yet...
this language has mandatory line numbers. lines execute in order by line
number, regardless of their order within the file, unless a GOTO is reached.
Line syntax
the following are the line types, where N is a line number,
and X is a variable name, which is made of letters and underscores,
and EXPR is a mathematical expression.
A assignment line is of the form
N X = EXPR
it sets the variable named X to the result of EXPR.
A goto line is of the form
N GOTO EXPR
it branches to the line numbered by the result of EXPR, or the line
of the lowest number above that.
a print line is of the forms:
N PRINT EXPR
N PRINT EXPR,EXPR
...
It prints out the results of the EXPRs. EXPR can
instead be a string in "double quotes".
a read line is of the forms:
N READ X
N READ X,Y
...
it reads numbers into the variables, but does not read past this line.
some functions can be used on the variable in this statement.
a reread line is of the form:
N REREAD
following reads will start again at the beginning of the current line.
a nextcard line is of the form:
N NEXTCARD
It advances to the next line.
EXPR syntax
the following binary operators are available, in order from closest
binding to loosest:
op meaning
** exponent
* multiply
/ divide
+ add
- subtract
% mod
the following are builtin functions
SIN(X) COS(X) TAN(X) ASIN(X) ACOS(X) ATAN() are the trig functions.
EXP(X) LOG(X) are the exponential and natural logarithm functions.
SGN(X) is the signum function.
MAX(X,Y,...) computes the maximum of its arguments.
MIN(X,Y,...) likewise computes the minimum
the following can only be used in PRINT and READ:
CHR(X) prints/reads a character with number X
HEX(X) prints/reads a hexadecimal number.
OCT(X) prints/reads a octal number.
When two non-CHR read expressions are consecutive, spaces are skipped between
them, e.g READ OCT(X),Y,HEX(Z) can read "77 238 FFAA".