Re: Problem: 4GL-Compiler, DEC Alpha AXP, OSF/1 FOR-statement
Posted in 1993
}From: btv002@btr0x1.hrz.uni-bayreuth.de (Th. Behr) }Subject: Problem: 4GL-Compiler, DEC Alpha AXP, OSF/1 FOR-statement }Date: 14 Oct 1993 11:11:58 GMT }X-Informix-List-Id: <news.4603> } }My Problem: } }MAIN } DEFINE i INTEGER } FOR i = 5 TO 1 STEP -1 } DISPLAY i } END FOR }END MAIN } }This FOR-Statement does nothing ! }A look at the C-code produced with 4gl 4.1: } }... }long fgl_fr1,fgl_fr2, fgl_fr3; }... }pushint(1) }_doneg(); }popint(&fgl_fr3); }... } }Reference Manual about C Functions: }Popping Functions Pushing Functions Argument Types }popint(&i) retint(i) int i; }poplong(&l) retlong(l) long l; } }I suspect some of the people at INFORMIX don't know the difference between }long and int ! } }Is there any solution ? As an intermediate solution, use DEFINE i SMALLINT which produces the correct code, or don't use an explicit increment or decrement, which evades the problem because a simple "fgl_fr3 = 1;" is emitted. As a longer term solution, get 4.12 when it is available. I have entered bug 20940 for this problem and it is now fixed in the main source code. Thank you for bringing this to our attention. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>