EXECUTE

filename

 The default file extension is .PCM
 If the filename is a text variable, it is first replaced by its value.

 VMS:  If filename is a logical name, it is replaced by its translation.
       If filename does not contain a file name extension, the default
       file name extension is appended to filename. Finally, if filename
       doesn't exist in the current directory, and if the logical name
       PHYSICA$LIB has been defined, that location is checked.

 UNIX: If filename is an environment variable, it is replaced by its 
       translation. If filename cannot be found in the current location,
       filename with the default file extension appended is checked. If
       this file cannot be found, and if the environment variable
       PHYSICA_LIB has been defined, then PHYSICA_LIB/filename is tried.
       Finally, if this file cannot be found, then PHYSICA_LIB/filename
       with the default file name extension appended is tried.

macro_library

 VMS:  The logical name PHYSICA$LIB can be used to point to the
       location for macro files, for example:
       $DEFINE PHYSICA$LIB dsk1:[dir1],dsk2:[dir2] 
       If the file cannot be found in the current directory, then
       PHYSICA$LIB:filename is tried.

 UNIX: The environment variable PHYSICA_LIB can be used to point to the
       location for macro files, e.g., %setenv PHYSICA_LIB /path
       If the file cannot be found in the current directory, then
       $PHYSICA_LIB/filename is tried.

echo_lines

 If the ENABLE ECHO command is entered, the commands that are read from
 the file will be displayed on the terminal screen.  This is useful for
 following the progress of a command file. If echoing is disabled in
 general, but is enabled within a macro command file, it will be on only
 while that file is executing.

keyboard_input

 If the TERMINAL command is encountered in a command file, control
 passes back to the keyboard. The user interactively enters commands
 at this point, until a null line is entered, that is, a carriage return
 at the prompt.  The command file then recommences execution with the
 command immediately after the TERMINAL command.

abort_macro

 If the RETURN command is encountered in a command file, control passes
 back to the calling macro, if there is one, or to the keyboard, if that
 macro was the top level macro.  If you type the RETURN command from the
 keyboard after a TERMINAL command has been encountered in a command file,
 execution of that command file is aborted.

 If CTRL-C is typed while a command macro is executing, the entire macro
 stack will be aborted, that is, no matter how deeply the macros are
 nested, program flow control is passed back to the keyboard.

parameters

 Parameters that are entered after the filename are used in one of
 two ways. Either the n_th parameter will replace the n_th ? that is
 found in the file, or the n_th parameter in the list will replace all
 ?n's found in the file. Sequential parameters must be in a one-to-one
 correspondence with the ?'s and in the correct order. It is possible to
 mix sequential and numbered parameters in the same file, but it is not
 recommended as this can be very confusing.

branching

 GOTO can only be used in a command macro file. Use a GOTO to branch to a
 label. A label is a character string that ends with a colon, :. A label
 must be on a line by itself, and it must have NO embedded blanks.  Do not
 include the colon with the label after a GOTO. 

Additional Information on:

  • 1_example
  • 2_example
  • looping

     DO loops can only be used in command macro files. DO loops in PHYSICA are
     similar to FORTRAN do loops, but must be terminated with ENDDO. The range
     of the DO loop can be any expression resulting in a vector. The loop will
     execute a number of times equal to the length of the loop range vector,
     with the loop variable taking on the values of each element of the loop
     range vector. Nested loops are allowed. The maximum number of DO loops
     allowed in a file is 50.  The looping variable is created as a scalar
     variable.
    

    Additional Information on:

  • 1_example
  • 2_example
  • 3_example
  • if_statments

     IF...THEN statements can only be used in command macro files.
     The general form of an IF...THEN statement is:   IF (boolean) THEN
     The boolean can take any form, but must be enclosed in parentheses,
     and it must have a scalar result. A result of 1 is true, while anything
     else is false. An IF...THEN statement can precede a single command. An
     IF...THEN statement can begin a block of commands, but it must be closed
     off with an ENDIF statement. Nested IF...THEN statements are allowed.
     The maximum number of IF...THEN blocks allowed within a file is 50. 
    

    Additional Information on:

  • 1_example
  • 2_example
  • 3_example