VMS Help  —  BASIC  /SYNCHRONOUS_EXCEPTIONS
   Controls whether or not the compiler produces additional code  to  emulate
   HP BASIC for OpenVMS VAX exception behavior.

   The format of the /SYNCHRONOUS_EXCEPTIONS qualifier is as follows:

      /[NO]SYNCHRONOUS_EXCEPTIONS

   Normally the compiler may reorder  the  execution  of  certain  arithmetic
   instructions  to  improve  performance.   If  your  program  generates  an
   arithmetic exception, such as  an  overflow  or  divide  by  zero,  it  is
   possible  that  certain statements surrounding the offending statement may
   or may not have executed.

   For example if a source program contains:

                     A = B
                     C = D / E
                     G = F

   and the value of E is zero, the second statement will generate a divide by
   zero  exception.   Because  of instruction reordering, it is possible that
   the assignment of B to A may not take place.  Further, it is possible that
   the assignment of F to G may take place even though the previous statement
   generated an exception.

   The /SYNCHRONOUS_EXCEPTIONS  qualifier  disables  such  reordering.   This
   allows  programs  which rely on arithmetic exceptions occurring at precise
   times to execute as expected.  It only impacts arithmetic  exceptions  and
   variable  stores  in  the  immediate  vicinity of the excepting statement.
   Usually  programs  will   produce   the   correct   result   without   the
   /SYNCHRONOUS_EXCEPTIONS qualifier.

   The /NOSYNCHRONOUS_EXCEPTIONS qualifier allows  the  compiler  to  produce
   more  efficient  code.   However  this  instruction  reordering  can cause
   incompatibilities with VAX BASIC.

   The default is /NOSYNCHRONOUS_EXCEPTIONS.
Close Help