SPL to HP C/XL Migration Guide (30231-90001)
11-3
There are a few HP C/XL reserved words that are also reserved words in
SPL, and there always exists the possibility that an SPL variable name
has a unique meaning as an HP C/XL reserved word. All keywords in HP
C/XL must be in lowercase, but relying on case differences to
differentiate between reserved words and variable names is bad practice.
The following is a list of words which are reserved in both languages,
but do not always mean the same thing:
CASE This is a statement in SPL, but, as case, it is used to label
switch alternatives in HP C/XL.
DO This statement is very similar, but SPL performs a DO-WHILE
test, while HP C/XL performs a do-until test.
DOUBLE This is a 32-bit signed integer in SPL, but a 64-bit IEEE
floating point number in HP C/XL. Variables declared DOUBLE
in an SPL program
must
be converted to type [long] int when
converting to HP C/XL.
ELSE This word is very similar in both languages, therefore simply
make certain that else is in lowercase at the time of
conversion. Also, make sure the statement before the else
ends with either a semicolon, ";", or a right brace, "}".
FOR This is a similar statement that has different syntax. See
"FOR Statement".
GOTO This is an identical operation, but SPL allows both GO and
GOTO. Changing both to lowercase goto is valid SPL and
prepares for the move to HP C/XL.
IF This statement is identical in both languages, but has
slightly different syntax. Change the word to lowercase.
LONG In SPL, this is a 64-bit floating point number in the MPE V
format. In HP C/XL, long is a 32-bit integer. Be certain to
convert it to double in HP C/XL. Also remember that the
64-bit floating-point internal formats are quite different on
the two systems.
RETURN This causes a return from a procedure or subroutine in SPL,
and also causes a return from a function in HP C/XL. Remember
to remove the SPL parameter and add the HP C/XL return value.
(See "RETURN Statement").
SWITCH In SPL, this declares a list of labels to be branched to by
an indexed GOTO. In HP C/XL, switch is a statement type,
analogous to the SPL CASE. (See "GO TO Statement").
WHILE This function is identical in both languages, having only a
slight difference in syntax.