Code: Select all
MODULE TestBugs;
IMPORT SYSTEM;
PROCEDURE Do();
VAR
r: REAL;
x: INTEGER;
BEGIN
r := r+ SYSTEM.ADR(x);
END Do;
END TestBugs.
Code: Select all
MODULE TestBugs;
IMPORT SYSTEM;
PROCEDURE Do();
VAR
r: REAL;
x: INTEGER;
BEGIN
r := r+ SYSTEM.ADR(x);
END Do;
END TestBugs.
Why:DevCPL486 wrote: PROCEDURE GenFLoad* (VAR src: Item);
VAR f: BYTE; mf: INTEGER;
BEGIN
IF src.mode = Con THEN (* predefined constants *)
DevCPE.GenByte(0D9H); DevCPE.GenByte(0E8H + src.offset)
ELSIF src.form = Int64 THEN
DevCPE.GenByte(0DFH); GenCExt(28H, src)
ELSE
f := src.form; IF src.form = Pointer THEN src.form := Int32 END; CheckForm(src.form, mf); src.form := f;
DevCPE.GenByte(0D9H + mf); GenCExt(0, src)
END
END GenFLoad;
Code: Select all
VAR r: Real; x: INTEGER;
r := SYSTEM.ADR(x)
Code: Select all
PROCEDURE CheckForm (form: BYTE; VAR mf: INTEGER);
BEGIN
IF form = Real32 THEN mf := 0
ELSIF form = Real64 THEN mf := 4
ELSIF form = Int32 THEN mf := 2
ELSE ASSERT(form = Int16); mf := 6
END
END CheckForm;
Code: Select all
MODULE TmpLuowy;
IMPORT SYSTEM;
VAR r, s: REAL; x: INTEGER;
PROCEDURE Do* ();
BEGIN
s := SYSTEM.ADR(x);
x := SYSTEM.ADR(x);
r := 0;
r := r + SYSTEM.ADR(x)
END Do;
END TmpLuowy.
Code: Select all
.r REAL -173993812.0
.s REAL -173993812.0
.x INTEGER -173993812
thanks your work!adimetrius wrote:Suggested temporary fix:
Code: Select all
ELSE (* not sysval *) (* int -> float *)
IF y.form =Pointer THEN y.form:=Int32 END;(*add this line*)
IF y.mode = Reg THEN Push(y) END;
Code: Select all
x.form := Int32(*Pointer*); x.typ := DevCPT.int32typ(*anyptrtyp*);
Assert(x, hint, stop);
The discussion is now at https://forum.blackboxframework.org/vie ... 7313#p7313 .luowy wrote:I created a discussion post on the center board https://forum.blackboxframework.org/vie ... f=40&t=790
Code: Select all
PROCEDURE CheckForm (form: BYTE; VAR mf: INTEGER);
BEGIN
IF form = Real32 THEN mf := 0
ELSIF form = Real64 THEN mf := 4
ELSIF form = Int32 THEN mf := 2
ELSIF form = Pointer THEN mf := 2 (* this is the addition *)
ELSE ASSERT(form = Int16); mf := 6
END
END CheckForm;
the center forum need a membership, You need to apply for one, you can ask Ivan how to do;adimetrius wrote:P.S. It seems I can't post at the other discussion page
you are right .adimetrius wrote:I'm pretty sure both DevCPL and DevCPC are in the backend.