Command Line Syntax

The GENeral language is made up of a series of command lines. Each line is a command and the possible types of commands are:

Command Line

Command #1,#2,#3,...      ! comment
  1. A line beginning in any GENerel or language control command.
  2. The command may be followed by any number of arguments appropriate for the command.
  3. Arguments are separated by white space or a comma. If an argument contains white space or commas (such as string arguments), enclose the argument in quotes. Any argument can be an expression.
  4. The line can be followed by an optional comment which is started by an exclamation point (note that in conditionals, "!=" is used for "not equal" so any comment, if used, must not begin in "!=").

Variable Assignments

#var = expression                  ! comment
#var[expression] = expression      ! comment
*#ref = expression                 ! comment
  1. A line beginning in #var where var is any valid variable name.
  2. The #var name must be followed by assignment operator ("=", "+=", etc.) and an expression. The variable is set equal to the result of the expression and the assignment operator.
  3. The line can be followed by an optional comment which is started by an exclamation point
  4. Any valid variable name can be an array variable by following it with square brackets enclosing an expression that evaluates to an index into the array (e.g., #x[3]).
  5. Variables can be set by reference. In the last example, if #ref="#var", that assignment will set #var to the expression.

Object Assignments

Internal Scripts define objects that use a separate namespace from variables. Object names can be assigned to objects using a modified assignment command:

@objName = (object)
@#ref = (object)

The second is setting an object by reference where variable #ref is the object name being set. See help on objects for more details.

Comment Line

! comments
  1. Lines beginning in an exclamation point are ignored and can be used for comments.
  2. Blank lines are also ignored and can be used to improve readability of input command files.