Bug #141
closed
Comparison of named empty string with array of SHORTCHAR does not work.
Added by J. Templ about 9 years ago.
Updated about 9 years ago.
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.
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.
@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.
@
- Status changed from New to Closed
Also available in: Atom
PDF