macrodef

 

Defines the name of a macro. This name can be used to refer to this macro in the MACROUSE or MOVIE commands. This command indicates that we are starting the definition of a macro. A conditional macro is a macro with if-then blocks and is evaluated in the physics code. Conditional macros must start with an if-then statement and must end with endif. If statements are like fortran ifs except the logical operators are not deliminated with `.'s. Also the operands can only be global variables including the user set variables var0 through var9. (Note: The end of the macro is indicated by MACROEND.)

Format

macrodef / macro name

 

macrodef Parameters

Parameters

Type/Value

Description/Default

macro_name

char*32

 

 

 

Example

macro

macrodef / movie1 definition

read / default **

viewread / view1 * macro

setvprt / 0.25, 0.25, 0.75, 0.75 * body

pltbob **

macroend terminator

 

 

macro

var1=.1 set variable

macrodef / cond1 definition

if ( time ge var1 ) then ** conditional

dtrs=.2 * macro

var1=99999. * body

endif **

macroend terminator