{ Read the file INCLUDE to learn how to include this file in your program } const SYMBOLLEN = 20; {length of string} BLANKS = ' '; type symboltype = array[1..SYMBOLLEN] of char; procedure GetSymbol (var identifier: symboltype); {Get the next identifier. Return blank if there aren't any left.} var index: integer; c: char; continue: boolean; ALPHANUMERICS: set of char; begin ALPHANUMERICS := ['a'..'z','A'..'Z','0'..'9']; {Find start of identifier.} continue := true; while not eof and continue do begin read(c); continue := not (c in ALPHANUMERICS) end; {Build identifier.} identifier := BLANKS; index := 1; continue := true; while (c in ALPHANUMERICS) and continue do begin if index <= SYMBOLLEN then begin identifier[index] := c; index := index + 1; end; if not eof then begin read(c); end else begin continue := false; end; end; end;