Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     PROCEDURE GetLiteral;
  2.     VAR i   : INTEGER;
  3.         ca  : ARRAY StrLen OF CHAR;
  4.     BEGIN
  5.         i := 0;
  6.         WHILE ch # '"' DO
  7.             IF i < StrLen-1 THEN
  8.                 IF ch = '\' THEN ca[i]:=ch; INC(i); GetCh() END
  9.             END;
  10.             IF i < StrLen-1 THEN
  11.                 ca[i]:=ch; INC(i)
  12.             END;
  13.             IF ch=CHR(13) THEN Mark("String literal exceeds line") END;
  14.             GetCh();
  15.         END;
  16.         ca[i] := 0X; str:=ca; str:=str.Substring(0, i); sym := Literal;
  17.         GetCh();
  18.     END GetLiteral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement