Project

General

Profile

Bug #90

SET64: when 32. element is set, wrong results

Added by Necati Ecevit 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Compiler

Description

If a SET64 variable contains 32. element as range, some of the outputs are wrong as shown below (on Win64/Linux64)

Outputs:

Do: 
{32..63} = {}
{32, 33, 34} = {34..32}
{31..63} = {63..31}
{32..63} - {32} = {63..33}
{32..63}, EXCL(s,32) = {}
{0..15, 32..63} = {15..0}
{33..63} + {32} = {}

{33..63},  INCL(s, 32) = {63..32}

{0..15, 31..63} = {63..31, 15..0}

Test module:

MODULE TestSet;

IMPORT Out;

(* {0..max} *)
PROCEDURE Do*;
VAR s: SET64;
BEGIN
    Out.String("Do: "); Out.Ln;
    s := {32 .. 63};
    Out.String("{32..63} = "); Out.Set(s);
    Out.Ln;

    s := {32, 33, 34};
    Out.String("{32, 33, 34} = "); Out.Set(s);
    Out.Ln;

    s := {31..63};
    Out.String("{31..63} = "); Out.Set(s);
    Out.Ln;

    s := {32..63} - {32};
    Out.String("{32..63} - {32} = "); Out.Set(s);
    Out.Ln;

    s := {32..63}; EXCL(s,32);
    Out.String("{32..63}, EXCL(s,32) = "); Out.Set(s);
    Out.Ln;

    s := {0..15, 32..63};
    Out.String("{0..15, 32..63} = "); Out.Set(s);
    Out.Ln;

    s := {33..63} + {32};
    Out.String("{33..63} + {32} = "); Out.Set(s);
    Out.Ln;  Out.Ln;

    s := {33..63}; INCL(s, 32);
    Out.String("{33..63},  INCL(s, 32) = "); Out.Set(s);
    Out.Ln;  Out.Ln;

    s := {0..15, 31..63};
    Out.String("{0..15, 31..63} = "); Out.Set(s);
    Out.Ln; 
    Out.Update;

END Do;

BEGIN

END TestSet.

TestSet.Do ~

System.Free TestSet ~

Associated revisions

Revision 9766 (diff)
Added by Florian Negele 10 months ago

Unified value type predicates

History

#1 Updated by Florian Negele 10 months ago

  • Status changed from New to Closed

Fixed in revision r9766. Thanks for reporting.

Also available in: Atom PDF