Differences

Differences

Top  Previous  Next

There are a few differences between EXPL and other versions of XPL0. The biggest differences are in the Intrinsics, which contain more device-independent intrinsics. In addition, one of the goals of EXPL was to integrate all the best features from the various other versions of XPL0. For example, interpreted XPL0 has certain features that aren't available in 32-bit native XPL0, and vice versa. This version attempts to integrate all the best features from all the versions into one package.

 

1. Updates and Integration. The following changes were made to bring the compiler into compliance with all the latest versions of XPL0. These changes also include features that were only available in one version of XPL0 and not others:

 

a. The arithmetic shift right operator.
b. The "and", "or" and "xor" operators.
c. The "to" and "downto" construct for "for" loops.
d. The underscore option in numbers. e.g. "12_345."
c. The "abs," "rem," "swap," "ext," "sqrt," "sq," "fix," and "float" functions are built in to the compiler and are also usable by constant expressions.
d. The "abs," "sqrt," and "sq" functions are overloaded so they support both integer and real arguments.
e. The "port" option was not added.

 

2. Error Messages. The runtime error messaging/trapping model has changed slightly from the original version of XPL0. In the original version each error was tied to a specific error number. Since there were only 15 error numbers, the error messages were very general. For example, error number 2 applied to any type of operation that involved reserving memory. There was no way to know if the error occurred because of a real Reserve or integer Reserve.

 

In EXPL the error number is thought of as a general error category. For example, error number 2 is now thought of as a general memory error. To clarify the exact cause of the error, each runtime error has a separate description that provides more detailed information about the error. For example, error number 2, the "Memory Error," may have any of the following descriptions: 'Out of Memory,' 'Array Reserve Exceeds Memory,' and 'Real Reserve Exceeds Memory.'

 

Error trapping remains the same since the same bits apply to each error. This means your code doesn't have to change. However the philosophy and model now makes it clear that the trap bits apply to general categories of errors, not specific errors. Here are the error numbers and the general categories they pertain to:

 

Click here for more detailed information about run-errors.