Starts a JPL procedure definition
param]...] ) ]
- Specifies the data type of the procedure's return value. An unqualified
proccommand returns an integer value. You can specify to return a string or double precision value by qualifying the
proccommand with the keywords
- A character string that specifies the JPL procedure name. Procedure names can be up to 31 characters long and contain any keyboard character except a blank space. When naming procedures in screen and public modules, be sure to avoid name conflicts, especially with any external modules that you wish to call by name.
- A parameter to receive the corresponding argument passed by this procedure's caller. You specify parameters as a comma- or space-delimited argument list within parentheses. Panther passes arguments by value–that is, the called procedure gets its own private copies of the values in the calling procedure's arguments. This means that the called procedure cannot directly alter a variable in its caller; it can only alter its own copies.
proccommand names a procedure and optionally specifies its parameters and return value's data type. If a module contains multiple procedures, each
procstatement serves to end the previous procedure. Only named procedures can be called from other procedures, and from application hooks such as control strings and Focus properties.
In the following example, the call to procedure
process_inputpasses data from variables
data2to the procedure's corresponding parameters. The procedure is defined to return a double value. This return value is used to determine whether the if statement evaluates to true or false:
if process_input(data1, data2) > 0.16667
double proc process_input(d1, d2)
//process d1 and d2 values
procstatement marks the end of one procedure and the start of another, you cannot embed one procedure definition inside another. Refer to Chapter 19, "Programming in JPL," in Application Development Guide for more information on procedure structure and execution.