Terminate Program Prematurely

Terminate PAscript programs prematurely with return.

The return keyword has different functionality depending on the context.

  • In a PAscript program, return terminates the program sequence.
  • In PAscript functions, return terminates the program function, not the program sequence.

Example: Possible Premature Termination

program
   section globals
     int32 a
   endsection
   if not a:isValid then
      return // program execution does not continue
   endif
   // .... further program code
endprogram