mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 08:42:24 +00:00
27 lines
No EOL
572 B
Modula-2
27 lines
No EOL
572 B
Modula-2
MODULE isptest;
|
|
|
|
IMPORT Files, Texts, Out, Platform;
|
|
|
|
CONST path="isptest.mod";
|
|
|
|
VAR
|
|
T: Texts.Text;
|
|
R: Texts.Reader;
|
|
ch: CHAR;
|
|
i, j, k : LONGINT;
|
|
BEGIN
|
|
NEW(T);
|
|
IF Files.Old(path) # NIL THEN
|
|
Texts.Open(T, path);
|
|
Texts.OpenReader(R, T, 0); Texts.Read(R, ch);
|
|
WHILE ~R.eot DO
|
|
Texts.Read(R, ch);
|
|
i := Texts.Pos(R);
|
|
Out.String("pos="); Out.Int(i,0); Out.String(" char="); Out.Char(ch); Out.Ln;
|
|
IF i = 21906 THEN
|
|
Out.String("21906"); Out.Ln;
|
|
(*Platform.Delay(10000);*)
|
|
END;
|
|
END;
|
|
END
|
|
END isptest. |