VMS Help PASCAL, Statements, WHILE, Examples *Conan The Librarian (sorry for the slow response - running on an old VAX) |
WHILE NOT EOLN (INPUT) DO BEGIN READ (x); IF NOT (x IN ['A'..'Z', 'a'..'z', '0'..'9']) THEN Err := Err + 1; END; This example reads an input character (x) from the current line. If the character is not a digit or letter, the error count, 'Err', is incremented by one. The loop terminates when an end-of-line on the INPUT is reached.
|