Re: 4gl function parameter problem
Posted in 2004
Jonathan Leffler <jleffler@earthlink.net> wrote in message news:<j1Rgc.277$eZ5.32@newsread1.news.pas.earthlink.net>... > 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? Sorry I didn't describe my question clearly. The statemnets in function m_ac31 are used to recover records which were wrote to database earlier. I randomly found that the recovery were not done correctly, but most of times it were ok .I was just thinking if there were any wrong usage in my statements like 'thru' or using arrays in parameters . Of course there were no mistakes when I compile this program . By the way , you mentioned that I did not use 'return' in my main program, I did have return statement under the sleep statement . Any problem of the statement? thanks for your comments