MENU SYNTAX SUMMARY

Copyright Warren K. Falls.  1984,1985.


Topics:

1.  Basic Structure
2.  Control Characters and Items
2A.    Formatting
2B.    Action Control Flags
2C.    Prompting
2D.    Program and System Management Control
2E.    Help
2F.    Interactive Control
2G.    Inter-script and Privilege Control
3.  Error Handling
4.  Substitution
5.  User Input
6.  Command Line Switches
7.  Examples of Scripts and Styles
8.  Summary of Control Items
9.  Debug Output
10. Screen Attribute Control Macros


1.  Basic Structure

Menu scripts are divivded into three fields:  (1) Title and Initialization;
(2) Selection and Action; and (3) Prompt.  Each field is separated from the
others by a "]" as the first character on a new line.  The separator between
the Title and the Selection fields can also be followed by a Selection field
format statement.  Each line of the script can also be divided into three
categories:  (1) Output Text; (2) Action Items; and (3) Control Items.

Example:

	Title Text
	Title Text
%control
$action
%control
](option)
Selection Text
%control
$action

Selection Text
%control
$action
%control
$action

Selection Text
$action
]
Prompt Text:



Title and Initialization Field
In the Title and Initialization field, text is included in the screen buffer.
Action and control items are processed prior to outputting the initial screen.
The final state of the control flags will be used as the defaults for the
Selection and Action field.

Selection and Action Field
In the Selection and Action field, text is included in the screen buffer.  Any
line without control or action item is considered to be a selection text.
Selection items are seperated from each other by the presence of control or
action items lines.  Selection items may have multiple lines.  Control flags
will effect only the current selection that modified them.  Control and Action
items belong to the selection item that preceeds them.

Prompt Field
In the Prompt field, only text is allowed.


Syntax Considerations
These are a few rules that should be followed when writing a menu script:

1.  Starting the Selection and Action Field with a Control or Action item, or
    ending it with a text line are both illegal.
2.  Any Control or Action item in the Prompt Field is also illegal.
3.  There is a limit of 22 selections in the Selection and Action Field.
4.  The "CLEAR" flag is cleared whenever any Action item or a Control item that
    produces output is executed; therefore it must be reset after any of those
    items if you wish to have the screen cleared again during the selection, or
    to have it set as the default flag at the end of the initialzation process.


Summary

A.  There are three fields, a Title, a Selection, and a Prompt area which are
    separated by a "]" as the first character in a line.

B.  All commands to be passed to the Operating System for execution must be
    preceeded by a "$".

C.  All control commands used by the interpreter must be preceeded by a "."

D.  Both field separaters must be present, even if the Title or the Prompt
    fields have no content.

E.  There must be at least one selection text and control and/or command item
    in the Selection field



2.  Control Characters and Items

In addition to the "]", there are four more control characters.  Like the "]",
all but one of the control character's meaning is position dependent.  There is
a comment line control character, ";", which must preceed all other, including
spaces and tabs.  This allows menu scripts to contain comments.  The only
character not position dependent is the "\".  This character is used as a field
delimitter and is treated essentially as an end-of-line or an end-of-record.
Two control characters who have meaning only as the first character of a new
line (like the "]") are the "%" and the "$".  The "%" is used to preceed a
control item, and the "$" is used to preceed an action item.

All items that are not preceeded by a control character are used as menu text.

Leading spaces and tabs are NOT counted as characters in the case of defining
a Control Character as the first character on a line.  Also spaces and tabs
immediately following a Control Character are ignored.  This allows the use
of indentation for clarity in scripts.

An item is defined as a string of characters that is terminated by a
delimitter or an end-of-line <CR>.  Items may contain both uppercase and
lowercase characters.

	Summary of Control Characters:

		]	As first character, seperates fields
		;	As first character, comment line indicator
		$	As first character, action item symbol
		%	As first character, control item symbol
		\	Item delimitter


Valid control items following a field seperator, "]", are:

ALPHA		BLANK		REPEAT		NUMBER

These items control the formatting of the selection area and the kind of
prompt that is generated for the user.

Valid control items following a control item symbol, "%", are:

ALLOW		AGAIN		ASK		ASKS		ASK?
BATCH		BLOCK		CALL		CHOICE		CLEAR
CLI		CONTINUE	DEBUG		DELAY		DISALLOW
END		ERASE		EXIT		FREE		GOTO
GRAPHIC		HOLD		IF		IFNOT		INQUIRY
KILL LAST	LAST		LOCK		MAINTAIN FLAGS	NO CLEAR
OFF		ON		OVERRIDE FLAGS	PASSWORD	PRIVILEGE
PROCEED ON ERR	PROMPT		PROTECT		QUERY		RESET
RETURN		SET		SILENT		SLAVE		SPLIT
STOP ON ERR	TEXT		TIMEOUT		TITLE		TOP
UNLOCK		VERBOSE		WAIT		WHOLE		XSTATUS
ZERO		?/HELP

These items fall into the following general categories: action control flags, 
prompt control, program and system management control, help control, interactive
control, inter-script control and privilege control.
All items can be called by the smallest unique character string, such as
"TE" for "TEXT", and "G" for "GOTO".




2A.  Formatting
These four control items select which of the four formats that the interpreter
will use in the generating of the Selection and Action Field.  These control
words are only valid immediately following the first field separtor.

	]NUMBER (Default State)
A formatting control item that will generate a numeric selection prompt for
each succeeding items.
Example:
Delete a file		equals	"    1  Delete a file"
List a directory	equals	"    2  List a directory"

Type a file		equals	"    3  Type a file"

	]ALPHA
A formatting control item that takes the first character of the selection
and uses it as the selection prompt, that character is not further used in the
output buffer.
Example:
DDelete a file		equals	"    D  Delete a file"
LDirectory of files	equals  "    L  Directory of files"

	]REPEAT
A formatting control item that takes the first character of the selection
and repeats it as the selection prompt.
Example:
Delete a file		equals	"    D  Delete a file"
List a directory	equals	"    L  List a directory"

	]BLANK
A formatting control item that displays no characters as a selection
prompt.
Example:
Delete a file		equals	"	Delete a file"
List a directory	equals	"	List a directory"



2B.  Action Control Flag 
This set of control items dictates what actions the interpreter will take when
executing action statements.

	%CLEAR (Default State)
An action control item flag that will cause the screen to be cleared prior to
the execution of the first action item or control item that produces output
to the screen.  To re-clear the screen during the proccessing of a selection,
the flag must be set again within the selection.  This flag only effects the
selection where it is encountered, subsequent selections revert to the default
flag.  (This is a valid initialization field control item which will then 
become the default flag if set at the end of processing.)

	%NO CLEAR
An action control item flag that will prevents the screen from being cleared.
This flag only effects the selection where it is encountered, subsequent 
selection revert to the default flag.  (This is a valid initialization field
control item which will then become the default flag.)

	%STOP ON ERR (Default State)
An action control item flag that prevents further execution of a selection if
an action item returns an exit status of non-one (one being a success code).
This flag only effects the selection where it is encountered, subsequent
selection revert to the default flag.  (This is a valid initialization field
control item which will then become the default flag.)

	%PROCEED ON ERR
An action control item flag that allows further execution of a selection no
matter what exit status is returned.  This flag only effects the selection
where it is encountered, subsequent selection revert to the default flag.
(This is a valid initialization field control item which will then become
the default flag.)

	%SILENT (Default State)
An action control item flag that will cause the silent submission of an action
item to be executed.  This flag only effects the selection where it is
encountered, subsequent selection revert to the default flag.  (This is a
valid initialization field control item which will then become the default
flag.)

	%VERBOSE
An action control item flag that will cause the action item to be executed
to be displayed on the screen prior to its execution.  This flag only effects
the selection where it is encountered, subsequent selection revert to the
default flag.  (This is a valid initialization field control item which will
then become the default flag.)



	%QUERY (Default State)
An action control item flag that causes the script interpreter to wait for
the completion of an action item before continuing.  If an exit status of
non-one is returned, and there are additional items in the selection then 
the screen is held and the user is asked whether to continue with the further
execution of the selection.  If there were no more items then the interpreter
will treat the case as a WAIT.  This selection will override the state of the
"STOP/PROCEED ON ERR" flag.  This flag only effects the selection where it is
encountered, subsequent selection revert to the default flag.  (This is a valid
initialization field control item which will then become the default flag.)

	%WAIT
An action control item flag that causes the script interpreter to wait for
the completion of an action item before continuing.  If an exit status of
non-one is returned, then the screen is held and the user is prompted to
enter a <CR> to continue.  Further execution of the selection is determined
by the state of the "STOP/PROCEED ON ERR' flag.  This flag only effects the
selection where it is encountered, subsequent selection revert to the default
flag.  (This is a valid initialization field control item which will then
become the default flag.)

	%CONTINUE
An action control item flag that causes the script interpreter to wait for
the completion of an action item before continuing.  The exit status is not
examined.  This flag only effects the selection where it is encountered,
subsequent selection revert to the default flag.  (This is a valid
initialization field control item which will then become the default flag.)

	%HOLD
An action control item flag that causes the script interpreter to wait for
the completion of an action item, hold the screen and prompt the user to
enter a <CR> to continue.  Further execution of the selection is determined
by the state of the "STOP/PROCEED ON ERR" flag.  This flag only effects the
selection where it is encountered, subsequent selection revert to the default
flag.  (This is a valid initialization field control item which will then 
become the default flag.)

	%BATCH
An action control item flag that causes the script interpreter to continue
immediately after the requesting of an action item.  The state of the
"STOP/PROCEED ON ERR" flag is ignored.  This flag only effects the selection
where it is encountered, subsequent selection revert to the default flag.
(This is a valid initialization field control item which will then become the
default flag.)



2C.  Prompting Items
These control items are used to interact with the user in obtaining action
item substitution strings.  (See Substitution section.)

	%ASK (insert) text
A prompting control item, that causes the text to be outputted and a "yes
or no" response is expected where a lone <CR> is defaulted to a "no".  If
the response is "yes" or "Yes" then the "insert" text is used as the
substitution.

	%ASKS (default) text
A prompting control item, that causes the text to be outputted and a response
expected.  if the response is a lone <CR>, then the "default" text is used as
the substitution.  The "default" text can have no length.

	%ASKS text
A prompting control item, that causes the text to outputted and a response is
required.  The response must have length and is used as the substitution.




2D.  Program and System Management Control
These control items effect how the script interpreter reacts after a selection
is made and a set of system management tools.

	%PROTECT
A control item that allows only privileged users from entering a menu.  This
item is only valid in the Title and Initailization Field.

	%CLI cliname
An action control item that tells the script interpreter to which CLI to
pass the command.  The default state of interpreter is that of terminal.
This item is only valid in the Title and Initialization Field.

	%TIMEOUT n
A control item that enters an input timeout value for the selection and
prompt items.  The timeout length is equal to 10 seconds times n, where n is
a number between 1 and 255.  Valid only in the Title and Initialization field.

	%DELAY n
A control item that causes the interpreter to stop for 'n' seconds, where 'n'
is a number between 1 and 999.

	%PROMPT
A menu control item that causes the interpreter to prompt for user's selections
without cursor pointer.  Valid only in the Title and Initalization field.

	%WHOLE (Default State)
A menu control item that causes the entire screen to used by the interpreter.
Valid only in the Title and Initalization field.

	%SPLIT
A menu control item that causes the interpreter to split the screen on the 
execution of a selection.  Valid only in the Title and Initalization field.

	%OVERRIDE FLAGS (Default State)
A menu control item that allows a 'child' script to start with all flags in the
normal, default states.

	%MAINTAIN FLAGS
A menu control item that forces a 'child' script to adopt the flag states of its
parent.

	%DISALLOW
A menu control item that prevents the execution of all following action items
in the the Title and Initialization field on a menu "RETURN".  Valid only in
the Title and Initialization field.

	%ALLOW (Default State)
A menu control item that allows the execution of all following action items
in the the Title and Initialization field on a menu "RETURN".  Valid only in
the Title and Initialization field.

	%HALT INITIALIZATION ON RETURN
A menu control item that halts the execution of the initialization sequence
on a "RETURN".  Valid only in the Title and Initialization field.


	%SLAVE
A control item that slaves the terminal.



	%FREE
A control item that un-slaves the terminal.

	%LOCK
A control item that disables the user command submit (the input "!" option), the
script goto (the input "@" option), the script reset (the input "PF3" option),
and the script exit (the input "PF4" option) inputs.  Valid only in the Title
and Initialization field.

	%UNLOCK (Default State)
A control item that turns off the "LOCK" control function.  Valid only in the
Title and Initialization field.

	%OFF
A control item that forces the terminal to be logged off when the script
interpreter exits.  Valid only in the Title and Initialization field.

	%ON (Default)
A control item that turns off the "OFF" control function.  Valid only in the
Title and Initialization field.



2E.  Help Control
This set of control items deals with what help is availible for each selection,
and the prompting items, if any.

	%? text
A help control item that causes the interpreter to request the Help Process
with the text appended as a topic descriptor.  The following control states
are used for the Help request:  (1) PROCEED ON ERR, (2) HOLD on RSX or WAIT on
VMS, and (3) the CLEAR/NO CLEAR flag is examined.

	%? (filespec)
A help control item that causes the interpreter to request the Type Process
with the filespec appended.  The following control states are used for the
Type request:  (1) PROCEED ON ERR, (2) HOLD,  and (3) the CLEAR/NO CLEAR flag
is examined.

	%? "text"
A help control item that causes the interpreter to write the text to the user
The following control states are used:  (1) HOLD, and (2) NO CLEAR.  (There
is no process requested.)

	%ASK? text or (filespec) or "text"
A help contorl item for the prompt item that must be coupled directly 
following the prompt item in the script.  The source of the help is the
same as the normal help control items; see the above three items.

	%DEBUG
A control item that will cause the interpreter to display the current state
of all important flags between the execution of all items.  It is also causes
the interpreter to act as though the verbose flag was set.  This item is only
valid in the Title and Initialization Field.



2F.  Interactive Control
These control items deal with all user input and output that do not deal with
substitution or help.

	%TEXT text/"text"
Outputs the text to the user.  Text strings can be surrounded double quotes.
To pass a null string or a linefeed to the user, you must use the quotes as
in (%TEXT "").

	%TITLE text
A prompting control item, valid only when not in split screen mode, that
clears the screen and output the text to the user on the top line of the
screen.  It then set the scrolling margins so that the top title line is
preserved.  Valid only in the Selection and Action Field.

	%TOP
A prompting control item, valid only when not in split screen mode, that
clears the screen, homes the cursor and sets the scrolling margins so that
the next outputted text will be preserved.  This is designed to work with
the verbose mode, to allow the spawned command to be saved on the screen.
Valid only in the Selection and Action field.

	%CHOICE
A prompting control item, valid only when not in split screen mode, that
will clear the screen, homes the cursor, display the text of the selection
from the menu, (first line only), and sets the scrolling margins so that the
text will be preserved.  Valid only in the Selection and Action field.

	%INQUIRY
Outputs text "Do you wish to halt this selection?  ", to the user.  A
"YES" response will stop the processing of the selection.

	%AGAIN
Outputs text "Do you wish to repeat this selection?  ", to the user.  A
"YES" response will restart the processing of the selection.  Flags will
be reset to their default state.  Valid only in the Selection and Action field.

	%BLOCK
Outputs the text "Please enter <CR> to continue:  " to the user and wait for
input.

	%GRAPHIC command string
The command string is executed immediately after every output of the menu
screen, but prior to the acceptance of any input.  The item is designed to
work with the DECUS VTM or the modified VTN screen output formatting tasks.
Valid only in the Title and Initialization field

	%LAST command string
The command string is executed just prior to the process exiting.  The string
is NOT executed at script changes and has no effect on future scripts.  Valid
only in the Title and Initialization field

	%KILL LAST
Cancels the effects of the LAST command.

	%ERASE
If in split screen, then the cursor is returned to the line below the menu
output, then the screen is cleared below it.  If no in split screen, then
it is treated as a screen reset.  Valid only in the Selection and Action field.

	%RESET SCREEN
Clears all screen scroll control, homes the cursor and clears the screen.
Valid only in the Selection and Action field.



2G.  Inter-Script and Privilege Control
These control items control what other scripts are presented and both script
and selection password and privilege masks.

	%GOTO menuscript filespec
A control item that closes execution of the present script and opens the
file listed for interpretation and execution.  Valid only in the Selection
and Action field.

	%CALL menuscript filespec
A control item that closes execution of the present script and opens the
file listed for interpretation and execution.  The present script filename
is saved on a stack for later return.  The Call does not save any further
context than the filename and upon Return execution starts at the beginning
except for Initilization Password processing.  Valid only in the Selection and
the Action field.

	%RETURN
A control item that closes execution of the present script and attempts to
remove a filename from its stack.  If there is no further names on the
stack, then the return is treated as an Exit.

	%ZERO
A control item that closes execution of the present script and opens the initial
script entered by the user and sets the script nesting level to 1.  Valid only
in the Selection and the Action field.

	%EXIT
A control item that closes execution of the present script and causes the
process to exit.

	%XSTATUS n
A control item that closes execution of the script and causes the process to
exit with an exit status of the number "n".  Valid only in the Selection and
Action field, and only if the LOGOFF flag is not set.

	%PASSWORD password name
A control item that causes the password process to be invoked with the name
given.  When this item occurs within the Title and Initialization field
it controls entry into the entire menu screen, when this item occurs within
a Selection and Action field, it controls the further processing of that
selection.

	%PRIVILEGE password name
A control item that causes the password process to be invoked with the name
given.  That process returns a 15 element mask that is used in determining
the results of the "IF" item.



	%SET n
A control item that will set the privilege mask with the number n.  The low-
order, privilege user bit is not effected.  The SET 1 and SET 0 commands sets
or clears, an additional logic flag, not in the privilege mask.

	%IF n
A control item that matches the privilege mask with the number n (1 to 16) to
determine whether the next item of the selection should be executed.  If the
match fails then a message is outputted, if in verbose mode, and the following
item of the selection is skipped.  IF 0 command tests the additional logic flag.

	%IFNOT n
A control item that matches the reverse of the privilege mask with the number
n (1 to 16) to determine whether the next item of the selection should be 
executed.  If the match fails then a message is outputted, if in verbose mode,
and the following item of the selection is skipped.  IFNOT 0 command tests the
additional logic flag.

	%END
A control item that stops the execution of a selection.  This item is used with
the "IF" and "IFNOT" control items in selection flow control.



3.  Error Handling

Script syntax errors are considered fatal, as are script file processing 
errors.  If this error occurs on the first script, then the process will
exit.  On subsequent scripts, then the previous script is re-entered.
Process errors are handled by control state flags.  Selection errors are
flagged, and the screen is then re-painted.


4.  Substitution

Substitution is handled on two levels, the first is based on strings passed
by the command line and replaces the sequence "\\n" where n is a number from
1 to 6.  Additionally to these six possible strings, the sequence "\\0" is
replaced by the lower two octals of the users' terminal number.  This string
can then be used to create discrete filenames for each version of SCRIPT 
running.  This sequence can occur anywhere in the script.  The second level
is local to each selection with the strings aquired by the ASK and ASKS items
of that selection.  These strings are cleared before each selection.  The
sequence that would be replaced is "##n" where n is a number from 1 to 4.
In both cases the order in which the string is aquired is related to the
number in the sequence.


5.  User Input

Valid cursor control inputs are: (1) arrow keys, (2) tab and backspace, (3)
space and "0".  Selection with the cursor is done by a <CR>.  Selection of
help with the cursor is done with a "?".  All other characters are accepted
as the beginning of a string input selection.  Strings terminated with a
"<CR>" are processed as a selection request, Strings terminated with a
"?<CR>" are processed as a help request.  If the first character of the
string is a "!" then the string is not treated as a request.  The following
string is submitted as an Action item with the following control states:
(1) CLEAR, (2) PROCEED ON ERR, and (3) WAIT.  If the first character of the 
string is a "@" then the string is treated as a filespec for a "GOTO" like
action.  If the first character of the string is a "?" then the remainder of
the string is used as an argument to HELP.  A lone "?" or a string of just
"HELP" or "help" will call for an input syntax help screen.
Function key also have meaning:  PF1 is a screen reset; PF2 is a help
request; PF3 is a process reset that will return to the first script
entered by the process; and PF4 is an Exit request.


6.  Command Line Switches

(There will be no switches defined in the near future.  Below functionality
can be accomplished by the use of substitution into "empty" control and/or
action item statements.
Example:
	Title Text
%	\\1
%	whatever

and a command line that includes " SCR "CLEAR\%VERBOSE\%WAIT\%TIME 4" filespec".
If no switches are required then a "SCR "" filespec" would also be legal.




7.  Examples of Scripts

A.


	File Services			
]					
Return to the Main Menu
	%RETURN				

List of Current Directory
	%HOLD
	  $PIP /BR

Type a File
	%NO CLEAR
	%ASKS Please enter file:  
	%HOLD
	%CLEAR
	  $TYPE ##0

Copy a File
	%NO CLEAR
	%ASKS File(s) to copy from:  
	%ASKS () Copy to:  
	  $COPY ##0 ##1
]

Please enter option:  

_______________________________________________________________________________

B.

	File Services

]
Return to the Main Menu\%RET

List of Current Directory\%H\$PIP /BR

Type a File\%N\ASKS Please enter file:  \%H\%CLE\$TYPE ##0

Copy a File\%N\ASKS Files to copy from:  \%ASKS () Copy to:  \$COPY ##0 ##1
]

Please enter option:  

_______________________________________________________________________________

Examples 'A' and 'B', both will generate the identical screens and results,
but demonstrate different concepts in script generation.  Example 'A' is a
clearer functional statement of the script.  On the otherhand, example 'B'
accurately portrays how the screen will appear.



8.  Summary of Control Items

Valid Title and Initialization Control Items (Least unique string capitolized)

ALlow		   ASK (insert) text	ASKS (default) text	ASKS text
ASK? text	   ASK? (filespec)	ASK? "text"		BAtch
BLock		   CLEar		CLI cliname		COntinue
DEBug		   DELay n		DIsallow	   	ENd
EXit		   Free			Graphic command		HAlt init
HOld		   IF n			IFNot n			INquiry
Kill last	   LAst command		LOck			Maintain
No clear	   OFf			ON			OVerride
PAssword #/name	   PRIvilege #/name	PROCeed on err		PROMpt
PROTect		   Query		Return			SEt n
SIlent		   SLave		SPlit			STop on err
TExt text/"text"   TImeout n		Unlock			Verbose
WAit		   WHole

Valid Selection and Action Field Control Items (Least unique string capitolized)

AGain		   ASK (insert) text	ASKS (default) text	ASKS text
ASK? text	   ASK? (filespec)	ASK? "text"		BAtch
BLock		   CAll filespec	CHoice			CLear
COntinue	   Delay n		ENd 			ERase
EXit		   Free			Goto filespec		HElp text
HElp (filespec)	   HElp "text"		HOld			IF n
IFNot n		   INquiry		No clear		PAssword #/name
PRIvilege #/name   PROceed on err	Query			RESet
RETurn		   SEt n		SIlent			SLave
STop on err	   TExt text/"text"	TItle text		TOp
Verbose		   Wait			Xstatus n		Zero
? text		   ? (filespec)		? "text"



9.  Debug Output

When the interpreter is in debug mode, (either by the control item "DEBUG" or
by the inclusion of a "D" in the command invocation (SCRIPTDEBUG etc.)) then
prior to the execution of each control or action item, it will output the
status of 16 important control flags and words.  The output appears like this:

CLR n SIL n FOR n SPN n WHO n LOG n LCK n CUR n CLI n
ALL n STP n OVR n LEV n FNC n SEL n LEN n PRVMSK  n

where:

CLR	= The status of the CLEAR Flag, which is set by the control item
	  "CLEAR" and reset by "NO CLEAR".

SIL	= The status of the SILENT Flag, which is set by the control item
	  "SILENT" and reset by "VERBOSE".

FOR	= The status of the screen format word, which is set by the first field
	  separtor item; 1 = "NUMBER", 2 = "ALPHA", 3 = "BATCH", and
	  4 = "REPEAT".

SPN	= The status of the action item control word, which can have the 
	  following values: 1 = QUERY, 2 = WAIT, 3 = HOLD, 4 = BATCH, and
	  5 = CONTINUE.

WHO	= The status of the WHOLE Flag, which is set by the control item
	  "WHOLE" and reset by "SPLIT".

LOG	= The status of the LOGOUT Flag, which is set by the control item
	  "OFF" and reset by "ON".

LCK	= The status of the LOCK Flag, which is set by the control item
	  "LOCK" and reset by "UNLOCK".

CUR	= The status of the CURSOR Flag, which is set by default and reset
	  by the "PROMPT" control item.

CLI	= The status of the CLIMOD Flag, which is set when a "CLI" control
	  item is successfully executed.  If this flag is set, it forces the
	  interpreter to reset the terminal to its original CLI when it exits.

ALL	= The status of the ALLOW Flag, which is set by the control item
	  "ALLOW" and reset by "DISALLOW".

STP	= The status of the STOP ON ERR Flag, which is set by the control item
	  "STOP ON ERR" and reset by "PROCEED ON ERR".

OVR	= The status of the OVERRIDE Flag, which is set by the control item
	  "OVERRIDE" and reset by "MAINTAIN".

LEV	= The status of the LEVEL control word which shows the nesting level
	  of the present script.  Levels are decended by the "CALL" control
	  item and ascended by the "RETURN".



FUNC	= The control item/function about to be executed.  See the table
	  below for its meaning:

1  ACTION	2  HELP/?	3  GOTO		4  QUERY	5  WAIT
6  HOLD		7  CLEAR	8  NO CLEAR	9  STOP ON ERR	10 PROCD ON ERR
11 SILENT	12 VERBOSE	13 CALL		14 RETURN	15 ASK
16 ASKS		17 BATCH	18 TEXT		19 INQUIRY	20 EXIT
21 PASSWORD	22 WHOLE	23 SPLIT	24 CLI		25 AGAIN
26 CONTINUE	27 BLOCK	28 PROMPT	29 DISALLOW	30 ALLOW
31 SLAVE	32 FREE		33 TIMEOUT	34 PRIVILEGE	35 IF
36 ASK?		37 TITLE	38 TOP		39 CHOICE	40 LOCK
41 UNLOCK	42 ON		43 OFF		44 ERASE	45 RESET
46 MAINTAIN	47 OVERRIDE	48 DELAY	49 IFNOT	50 XSTATUS
51 ZERO		52 END		53 SET		54 HALT INIT	55 KILL LAST


SEL	= The number of the selection chosen between 1 and 22 with 0 being the
	  initialization process.  Alpha input is converted to a numeric equal
	  to its equivilent if the "NUMBER" screen format had been chosen.

LEN	= The length, if any, of the item/function's object string, such as
	  filename for the "GOTO" item or the number of the "TIMEOUT".  Items
	  such as "HOLD" or "CLEAR" have no object strings.

PRVMSK	= The state of the Privilege Mask word, which is really a sixteen
	  element bit mask.  The high order fifteen bits are returned by the
	  "PRIVILEGE" item, and the lowest order bit (the 1 bit) is set or
	  cleared by whether the user is privileged (1) or not (0).


When evaluating the results, remember, that the output is prior to the execution
of the function in the "FNC n" field, therefore, whatever flags/control words
are modified by that function/item will not have taken place.

An additional debug feature is setting the no execution flag by the inclusion
of a "N" in the command invocation (SCRNO or SCRIPTNODEBUG etc.).  In this mode
the interpreter will be forced into verbose mode but no action items will be
executed.



10.  Screen Attribute Control Macros

There are a number of attributes that can be manipulated by a set of special
commands.  These controls are only valid in a text field that is to be displayed
on the menu.  They are not valid in the text field of any control item.  The
syntax of these special commands is a "!" followed immediately by the control
string or word which must be terminated by a space or tab.  (The string can be
shorten to its first character.)  When encountered, the "!", the string and
the space or tab are replaced by the appropriate escape sequence.  Attributes
are only valid on the line where they are found.  The interpreter will append
a sequence to return the attributes to normal, if needed at the end of the
line.  The attributes that can be controlled are:

!Bold 		Bold Characters
!Flash		Flashing Characters
!Underline	Underline Characters
!Reverse	Reverse Video
!Normal		The above atrributes are cancelled

!Wide		Double Wide Characters
!Tall		Doulbe Tall Characters ***
!Height		Double Wide and Tall Characters ***

!Ascii		Normal/Ascii Character Set
!Graphic	Graphic Character Set
!Special	Special Graphic Character Set

*** Valid only in the Title and Initialization Field