Default error behavior

As a simple example of the behavior of EASI when encountering an error, consider the following user defined function:

DEFINE FUNCTION Invert( x )
  local float y
  y = 1 / x
  return( y )
ENDDEFINE

Once the function has been loaded into EASI, it can be used interactively as follows:

EASI>print Invert( 2 )
0.5

However, when called with an argument of zero, an error will occur:

EASI>print Invert( 0 )
E608:Divide by zero.

The error number 608 indicates an illegal operation was attempted, in this case division by zero has occurred. It is important to note that once the error happens, execution immediately halts. No statements after the statement on which the error actually occurred are executed; in the example above the statement "return( y )" is not executed. Instead, the function simply terminates.

Similarly, if the function causing the error was called from within another function or script, the calling function would also be terminated. In general, once a statement causing an error is executed, all execution is terminated, including all levels of calling functions, up to the top level. Control then returns to the EASI prompt, and the error number and message are displayed.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.