SPL to HP C/XL Migration Guide (30231-90001)
5- 36
This function makes use of the fact that HP C/XL terminates a string with
the NUL character ('\0', numeric value 0).
Consequently, the SPL code
LEN := B1 := "test string",0;
CNT := TOS; <<always zero>>
@S1 := TOS;
@D1 := TOS;
may be replaced with:
LEN = MOVESB(S1,"test string",0,&S1,&S1);
MOVEX Statement
This SPL statement is available only to privileged users accessing extra
data segments. Any use of extra data segments should be recoded,
utilizing the larger memory space available in HP C/XL.
SCAN Statement
Table 5-30. SCAN Statement
---------------------------------------------------------------------------------------------
| | |
| SPL | HP C/XL Equivalent |
| | |
---------------------------------------------------------------------------------------------
| | |
|
scan-statement
: | No direct equivalent. |
| | |
| SCAN
byte-ref
{WHILE | |
| UNTIL}
testword
| |
| | |
| [,
stack-decr
] | |
| | |
---------------------------------------------------------------------------------------------
| | |
|
byte-ref
is one of: | Same as SPL, except * stack reference must |
| | be recoded. |
|
array/pointer-id
| |
| | |
|
array/pointer-id
(
index
) | |
| | |
| * | |
| | |
---------------------------------------------------------------------------------------------
| | |
|
testword
is one of: | |
| | |
| integer constant | |
| INTEGER or LOGICAL variable | |
| string constant of one or two characters | |
| * | |
| | |
---------------------------------------------------------------------------------------------
| | |
| First character of
testword
is | |
|
terminal-char
. Second character of | |
|
testword
is
test-char
. If
terminal-char
is| |
| omitted, it is NUL (numeric 0). | |
| | |
---------------------------------------------------------------------------------------------
| | |