Program
Structure
Comments
230
specified as the first argument. The default is G0, which
always contains the currently displayed screen. Thus, the
full syntax for the PIXON command is:
PIXON([G,] xposition, yposition [ ,color]);
Some built-in commands employ an alternate syntax,
whereby function arguments do not appears in
parentheses. Examples include RETURN and RANDOM.
Programs can contain any number of subroutines (each of
which is a function or procedure). Subroutines start with
a heading consisting of the name, followed by
parentheses that contain a list of parameters or
arguments, separated by commas. The body of a
subroutine is a sequence of statements enclosed within a
BEGIN END; pair. For example, the body of a simple
program, called MYPROGRAM, could look like this:
EXPORT MYPROGAM()
BEGIN
PIXON(1,1);
END;
When a line of a program begins with two slashes, //,
the rest of the line will be ignored. This allows the
programmer to insert comments in the program:
EXPORT MYPROGAM()
BEGIN
PIXON(1,1);
//This line is just a comment.
END;
Programming