P
Patrick Tingen
Guest
In one of our include files I came across some interesting behaviour. First, create the following include file: /* c:\temp\1.i */ &IF DEFINED(myParam) = 0 &THEN MESSAGE 'Not defined' VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. &ELSE MESSAGE 'Defined' VIEW-AS ALERT-BOX INFORMATION BUTTONS OK. &ENDIF Then run this: /* 1 */ {c:\temp\1.i &myParam } /* defined */ /* 2 */ {c:\temp\1.i &abc=1 &myParam } /* defined */ /* 3 */ {c:\temp\1.i &myParam=* &abc } /* defined */ /* 4 */ {c:\temp\1.i &myParam=* &abc=1 } /* defined */ /* 5 */ {c:\temp\1.i &abc &myParam } /* not defined */ /* 6 */ {c:\temp\1.i &myParam &abc } /* not defined */ /* 7 */ {c:\temp\1.i &myParam &abc=1 } /* not defined */ I already added the outcome, but what strikes me are the cases where it says "Not Defined". It looks like the order of the parameters influence the value of DEFINED. Case #1 - #4 are as expected. Even if the parameter has no value, it /is/ defined. Starting at #5 things are going downhill for me. Why is the parameter "Not defined" there? Is this a bug in the compiler or is this expected (and documented somewhere)? Tested in 10.1C / 11.2 / 11.7
Continue reading...
Continue reading...