SPL to HP C/XL Migration Guide (30231-90001)
2- 5
functions either by declaring them as global (to all functions) or by
passing them as parameters.
See "SUBROUTINE Declaration".
Intrinsics
Table 2-9.
-
--------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
| System and user-defined intrinsics are | System and user-defined intrinsics are |
| accessed with the INTRINSIC declaration. | accessed with the #pragma intrinsic and |
| | #pragma intrinsic_file directives. |
| | |
---------------------------------------------------------------------------------------------
A major advantage of HP C/XL is the large number of functions available
in the standard function library. These serve most of the purposes that
an SPL program requires intrinsics for (such as I/O). The library also
includes numerous routines for byte manipulation, input/output, memory
control, and data formatting.
Compound Statements
Table 2-10. Compound Statements
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
compound-statement
: |
compound-statement
: |
| | |
| BEGIN [
statement
] [;...] [;] END |
"
{
"
[
statement
] [...]
"
}
"
|
| | |
---------------------------------------------------------------------------------------------
| | |
| Semicolons are
not
part of statements; they| Semicolons
are
part of statements; they are|
| are used to
separate
statements. | required terminators. "Extra" semicolons |
| | form null statements, similar to SPL. |
| | |
---------------------------------------------------------------------------------------------
| | |
| Example | Example |
| | |
| BEGIN | { |
| A := 10 ; | A = 10 ; |
| B := 17 OR B := 17 ; | B = 17 ; |
| END | } |
| | |
---------------------------------------------------------------------------------------------
In HP C/XL, a compound statement may be a block. That is, it may contain
declarations for data that is local to itself.