2016-12-06 21:07:22 +00:00
|
|
|
MODULE test;
|
2016-12-11 22:06:37 +00:00
|
|
|
FROM Test IMPORT fail, finished;
|
2016-12-06 21:07:22 +00:00
|
|
|
|
|
|
|
TYPE charset = SET OF CHAR;
|
|
|
|
|
|
|
|
PROCEDURE Space(c: CHAR): BOOLEAN;
|
|
|
|
BEGIN
|
|
|
|
RETURN c IN charset{' ', 11C, 12C, 15C}
|
|
|
|
END Space;
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
IF Space('a') THEN
|
2016-12-11 22:06:37 +00:00
|
|
|
fail(1);
|
2016-12-06 21:07:22 +00:00
|
|
|
END;
|
|
|
|
IF NOT Space(' ') THEN
|
2016-12-11 22:06:37 +00:00
|
|
|
fail(2);
|
2016-12-06 21:07:22 +00:00
|
|
|
END;
|
|
|
|
IF NOT Space(12C) THEN
|
2016-12-11 22:06:37 +00:00
|
|
|
fail(3);
|
2016-12-06 21:07:22 +00:00
|
|
|
END;
|
2016-12-11 22:06:37 +00:00
|
|
|
finished;
|
2016-12-06 21:07:22 +00:00
|
|
|
END test.
|