Actions
Bug #141
closedComparison of named empty string with array of SHORTCHAR does not work.
Start date:
11/02/2016
Due date:
% Done:
0%
Estimated time:
Forum topic:
Description
Comparison of named empty string with array of SHORTCHAR does not work.
Instead of comparing 0X with the first array element, -1 is used.
This seems to be the same kind of bug as #128, which fixed it for assignment.
Reported by Josef Templ, 2016-11-02.
Updated by J. Templ almost 9 years ago
This test program shows the bug.
It calls HALT instead of HALT.
MODULE Test;
CONST empty = "";
PROCEDURE Do*;
VAR s: ARRAY 10 OF SHORTCHAR;
BEGIN
s := "";
IF s = empty THEN HALT(99)
ELSE HALT(88)
END
END Do;
END Test.
Updated by J. Templ almost 9 years ago
@This test program shows the bug.
It calls HALT 88 instead of HALT 99.
MODULE Test; CONST empty = ""; PROCEDURE Do*; VAR s: ARRAY 10 OF SHORTCHAR; BEGIN s := ""; IF s = empty THEN HALT(99) ELSE HALT(88) END END Do; END Test.
@
Actions