Call Statement

The call() statement suspends the current process, executes another script, and then returns to the original process.

The following example, from the default CONTACT callin script, illustrates how the call statement can be used to interrupt the process to run a script that returns a result, and then continue the current process using the result of the called script:

# Authenticate and present notifications

call authenticate

if ( $authenticated )

  $companyValid = @session::isCompanyStatusValid()

  if ( $companyValid )  

...

 

In the above example, the callin script uses the call statement to run the INTERACTION authenticate script, which sets the value of the $authenticated variable, and then begins an IF statement based on the returned variable.

Flow Control