Project

General

Profile

Bug #91

RANGE: first, last, step values wrong (Linux64)

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

Status:
Closed
Priority:
Normal
Category:
Compiler

Description

MODULE TestRange;
IMPORT Out;

PROCEDURE Do*;
VAR r, r2: RANGE;
BEGIN
  r := 0..10 BY 2;
  Out.Int(FIRST(r), 0); Out.Int(LAST(r), 16); Out.Int(STEP(r), 16);
  Out.Ln; Out.Update;

  FIRST(r2) := 0; LAST(r2) := 10; STEP(r2) := 2;
  Out.Int(FIRST(r2), 0); Out.Int(LAST(r2), 16); Out.Int(STEP(r2), 16);
  Out.Ln; Out.Update;
END Do;
END TestRange.

TestRange.Do ~ 
System.Free TestRange ~ 

Output:

0     42949672960              10
42949672960      8589934602               2

Associated revisions

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

Fixed offset disposition for LAST and STEP

History

#1 Updated by Florian Negele 10 months ago

  • Status changed from New to Closed

Fixed in revision 9768, thanks for reporting.

Also available in: Atom PDF