Re: [ooc-compiler] Application compile runtime error
Brought to you by:
mva
|
From: Michael v. A. <Mic...@de...> - 2004-07-07 08:27:40
|
Frank Hrebabetzky <fh...@ph...> writes:
> When trying to compile my application ("oo2c testmpp.Mod"), the response is
>
> ## Runtime error in module OOC:SSA:WriteC at pos 13856
> ## Dereference of NIL
>
> I am using oo2c_32-2.1.3 under WindowsXP / MingW / MSYS. My program (I
> attached it just in case) has grown pretty large, so just a hint about
> the kind of statement that is bothering, where to look for what, would
> help.
The assigment with SYSTEM.VAL fails. The following workaround should
preserve your intended semantics without crashing the compiler.
--- testmpp.Mod.orig Wed Jul 7 10:13:50 2004
+++ testmpp.Mod Wed Jul 7 10:24:29 2004
@@ -118,7 +118,8 @@
END
ELSIF str="MOVE" THEN
cmd:= MOVE;
- cs:= SYSTEM.VAL(CharSeq, par1); par1:= ORD(cs[0]); par2:= ORD(cs[1]);
+ SYSTEM.MOVE(SYSTEM.ADR(par1), SYSTEM.ADR(cs), SIZE(INTEGER));
+ par1:= ORD(cs[0]); par2:= ORD(cs[1]);
ELSIF str="MOVREF" THEN cmd:= MOVREF
ELSIF str="WAIT" THEN
IF par1<0 THEN cmd:= ERRCMD
I will need to investigate further why this application of VAL does
not work. If necessary, I will turn this particular scenario into a
compile time error.
-- mva
|