4gl function parameter problem
Posted in 2004
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi there , Could anybody please tell me if my statements below are correct syntax in 4gl program ? In my main program , statements are as below: ............ if m_ac31('2',n.acm02,n.acm00,n.acm01, o[i].acn02 thru o[i].acn15) then display "m_ac31 error ",o[i].acn02 at 21,1 sleep 5 return 1 end if .... and m_ac31 is a function outside of main program. I don't konw if it's all right to pass parametes with array variables like o[i].acn02, o[i].acn15 ... etc. Any comments from you will be appreciated. thanks in advance pamela
daisy wrote: > Could anybody please tell me if my statements below are correct syntax in > 4gl program ? You're compiler would let you know if it was wrong, wouldn't it? > In my main program , statements are as below: > > ............ > if m_ac31('2',n.acm02,n.acm00,n.acm01, > o[i].acn02 thru o[i].acn15) then > display "m_ac31 error ",o[i].acn02 at 21,1 > sleep 5 > return 1 > end if Generally, you don't use RETURN in a MAIN - it is equivalent to EXIT PROGRAM. > .... > and m_ac31 is a function outside of main program. > > I don't konw if it's all right to pass parametes with array variables like > o[i].acn02, o[i].acn15 ... etc. In general, yes, the syntax is OK. > Any comments from you will be appreciated. So, what's the error you are seeing? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
It won't like the THRU. Also I'd use a PROMPT rather than a DISPLAY and a SLEEP - sleep statements are really annoying to end users. Andy reallypamela_tw@yahoo.com (daisy) wrote in message news:<43e48577.0404190138.f1a9d1e@posting.google.com>... > Hi there , > Could anybody please tell me if my statements below are correct syntax in > 4gl program ? > > In my main program , statements are as below: > > ............ > if m_ac31('2',n.acm02,n.acm00,n.acm01, > o[i].acn02 thru o[i].acn15) then > display "m_ac31 error ",o[i].acn02 at 21,1 > sleep 5 > return 1 > end if > > .... > and m_ac31 is a function outside of main program. > > I don't konw if it's all right to pass parametes with array variables like > o[i].acn02, o[i].acn15 ... etc. > > > Any comments from you will be appreciated. > > thanks in advance > > pamela