Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


7.1.10 Call

Purpose

Flow control procedure that passes control to a Sub procedure or Function procedure.

Syntax
[Call] Name [(ArgumentList)]
Arguments
Call

Optional keyword.

Name

Write the name of the procedure to be called.

ArgumentList

Specify a comma-delimited list of variables or expressions to pass to the procedure.

Description

The Call keyword is optional when calling a procedure. However, you must enclose the arguments in parentheses if you call a procedure as the argument of another procedure or command, or if you call a procedure in an expression. If you call a procedure with the Call keyword specified, the return value of the called procedure cannot be acquired. To acquire the return value of the procedure, call the procedure with the Call keyword omitted.

When a Function procedure and Sub procedure have the same name, the Function procedure takes precedence in a Call statement.

Supplementary note

During the execution of a script, the following message might appear: Could not find the procedure. In this case, review the naming convention for Function and Sub procedures and recheck how these procedures are defined.

Examples
Call MyProc(0)
 
MyProc 0
JP1/Script version

Supported from JP1/Script 01-00.