CERN home page CERN home page Consult pages Consult pages Writeups at CERN Writeups at CERN Garfield pages Garfield pages Help Help algebra algebra variables variables predefined predefined Table of contents Keyword index

algebra: variables: predefined


BATCH

A global variable of type Logical which is set to True if Garfield is currently run in batch and which is set to False if the program runs interactively.

A program is sayd to run in batch if the standard input stream is anything else than terminal input. For instance, running under Unix with input taken from a file (e.g. by typing garfield < input) will result in BATCH being set to True.


INPUT

A String that contains the name of the current input file.

The variable has a value of "Standard input" when input comes from standard input. The value changes while an initialisation file is read, and also whenever you use input redirection.

This variable can be used to construct automatically a name for a metafile:

If input#`Standard input` Then
   !add meta type PostScript file-name "{input}.ps"
   !open meta
   !act meta
Else
   !add meta type PostScript file-name "garfield.ps"
   !open meta
   !act meta
Endif

INTERACT

A global variable of type Logical which is set to False if Garfield is currently run in batch and which is set to True if the program runs interactively.

A program is sayd to run interactively if the standard input stream is terminal input. INTERACT will be set to True if you start Garfield by simply typing the name of the executable, but INTERACT will be set to False if input is taken from a file (e.g. by typing garfield < input).


MACHINE

A global variable of type String which contains the type of computer for which the executable has been produced.

Currently, the following values can be returned:

Value Meaning
Apollo Apollo systems running SR 10
CMS VM/CMS, an IBM operating system
Cray Cray running UNICOS
MVS MVS, an IBM operating system
Vax Vax or Alpha systems running VMS or OpenVMS
Unix Various Unix systems, including Linux
< not known > Unidentified system


OK

A Logical that tells whether the last algebraic operation was successful.

Most procedures and also several regular commands set this variable depending on the success of the calculations requested.


OUTPUT

A String that contains the name of the current output file.

The variable has a value of "Standard output" when outut is sent to the standard output stream. The value changes whenever you use output redirection.


TIME_LEFT

The time left, expressed in seconds.

Time limits are relevant mostly while running in batch and checking this variable permits graceful termination of iterative calculations.

This variable is of type Number.


Go to the top level, to algebra, to variables, to predefined, to the topic index, to the table of contents, or to the full text.

Formatted on 15/01/01 at 23:07.