mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 13:22:26 +00:00
Add isptest (active) and In.Mod (not yet used).
This commit is contained in:
parent
a4c372253b
commit
1e7d3ca4fd
6 changed files with 1317 additions and 18 deletions
27
src/test/confidence/isptest/isptest.mod
Normal file
27
src/test/confidence/isptest/isptest.mod
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue