Lines

FISH programs can be embedded in a PFC data file or may be entered directly into the console. Lines following the word c define are taken to be statements of a FISH function; the function stops when the word c end is encountered. A valid line of FISH code must take one of the following forms.

  1. The line starts with a statement, such as if, loop, etc. (see “FISH statements”).
  2. The line contains one or more names of user-defined FISH functions, separated by spaces (for example, fun_1 fun_2 fun_3).
  3. The line consists of an assignment statement (i.e., the expression on the right of the = sign is evaluated, and the value is given to the variable or function name on the left of the = sign).
  4. The line consists of a PFC command, provided that the line is embedded in a section of FISH code delimited by command - endcommand.
  5. The line is blank or starts with a semicolon.

FISH variables, function names, and statements must be spelled out in full—they cannot be truncated, unlike PFC commands. Continuation lines are allowed with the ... control statement at the end of the line. FISH is “case-insensitive” at all times. Spaces are significant (unlike in FORTRAN) and serve to separate variables, keywords, etc.; no embedded blanks are allowed in variable or function names. Extra spaces may be used to improve readability (for example, by indenting loops and conditional clauses). Any characters following a semicolon ( ; ) are ignored; comments may be embedded in a FISH program by preceding them with a semicolon. Blank lines may be embedded in a FISH program.