pTAL Reference Manual (H06.03+)
Statements
HP pTAL Reference Manual—523746-005
12-46
WHILE
Hardware indicators cannot appear in the conditional expression of a WHILE
statement.
The WHILE statement in Example 12-52 on page 12-46 increments index until a
nonalphabetic character occurs.
Example 12-51. WHILE Statement
LITERAL len = 100;
INT .array[0:len - 1];
INT item := 0;
WHILE item < len DO
BEGIN
array[item] := 0;
item := item + 1;
END;
! item equals len at this point
Example 12-52. WHILE Statement
LITERAL len = 255;
STRING .array[0:len - 1];
INT index := -1;
WHILE (index < len - 1) AND
($ALPHA(array[index := index + 1]))
DO ... ;










