;-*- indented-text -*-
Brief and informal description of Focal command.

	Edited by Akira KIDA, <SDI00379@niftyserve.or.jp>.

	In description below:
	    LGRP means any of a group number (ex. 10, 20).
	    LNUM means any of a line number (ex. 10.30, 20.40).

	All the commands may be abbreviated to the first letter.


ask		interactive numeric value assignment to variable(s).

	ask (["prompt"][,][v][,])...

		NB. v can be subscripted (v(i)).

comment
	comment		skip until end-of-line.


do			call subroutine.
	do all		call all groups in order as subroutine.
	do LNUM		call specified line and just return
			after executing the line only.
	do LGRP		call specified line group and return
			after executing all the lines belong to the
			group.


erase		erase whole or a part of program/variable on memory.

	erase		erase all the variable.
	erase all	erase the entire program.
	erase LNUM	erase the specified line.
	erase LGRP	erase the specified line group.


for		iteration.

	for v=i,e; <COMMAND>		do <COMMAND> with v from i
					through e by 1.
	for v=i,e,s; <COMMAND>		do <COMMAND> with v from i
					through e by s.

		NB. v can be subscripted (v(i)).

goto		unconditional jump.

	goto LNUM	jump to the specified line.
	goto		jump to the beginning of the program.


if		conditonal.

	if e LNUM_NEG ; CMD	if (e < 0) goto LNUM_NEG else CMD.

	if e LNUM_NEG, LNUM_ZERO ; CMD
				if (e < 0) goto LNUM_NEG
				else if (e == 0) goto LNUM_ZERO
				else CMD.

	if e  LNUM_NEG, LNUM_ZERO, LNUM_POS
				if (e < 0) goto LNUM_NEG
				else if (e == 0) goto LNUM_ZERO
				else goto LNUM_POS.


library		extended command.

	library save <FILENAME>
			save current program to <FILENAME>.
	library call <FILENAME>
			call(load) program from <FILENAME>.
	library delete <FILENAME>
			delete <FILENAME>.
	library list [<DIR>]
			list library at <DIR> or . if <DIR> is omitted.


quit		stop execution.

	quit	exit to operating system if used in top level.


return		return form subroutine.

	retrun

set		assign a value to a variable.

	set v=expr

		NB. v can be subscripted (v(i)).

type		typeout.

	type e[, e]...
		e may be an arithmetic expression or one of the
		following:

		%IW.FW	set integral precision IW and fraction
			precision FW.
		!	print newline.
		#	print carriage return.
		"str"	print string.

write			write program list.

	write		write whole program.
	write LGRP	write specified group.
	write LNUM	write specified line.


	- * -		- * -		- * -

Syntax of expression in Focal.

EXPR ::=	PRIMARY
		SIGN PRIMARY
		EXPR  ADDOP PRIMARY

ADDOP ::=	'+' | '-'

PRIMARY ::=	TERM
		PRIMARY MULOP TERM

MULOP	::=	'*' | '/' | '^'

TERM ::=	'(' EXPR ')'
		'[' EXPR ']'
		'<' EXPR '>'
		NUMBER
		VARIABLE
		VARIABLE '(' EXPR ')'
		BUILTIN '(' EXPR ')'

NUMBER ::=	MANTISSA
		MANTISSA e SIGNED

MANTISSA ::=	INTEGER
		INTEGER .
		 . INTEGER
		INTEGER . INTEGER

SIGNED ::=	INTEGER
		SIGN INTEGER

SIGN ::=	'+' | '-'

INTEGER ::=	DIGIT
		INTEGER DIGIT

DIGIT ::=	'0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

VARIABLE ::=	ALPHA
		VARIABLE ALPHA
		VARIABLE DIGIT

ALPHA ::=	'A' .. 'Z' | 'a' .. 'z'

BUILTIN ::=	'fsin' | 'fcos' | 'fexp' | 'flog' | 'fatn'
		| 'fsqt' | 'fabs' | 'fsgn' | 'fitr' | 'fran'
