Re: Debugger & Arguments
Posted in 1995
>From: storm@aztec.co.za (Storm Software) >Subject: Re: Debugger & Arguments >Date: 20 Jan 1995 15:28:42 GMT >X-Informix-List-Id: <news.10967> > >Sco Unix 3.2.4 >Informix R4GL 4.11 UC2 >SE 5.0 > >If you try > > ru "fred is wild" > >in the debugger, we get a core dump. Quotes seem to be the problem. >Anybody else? > >Single quotes is used so we're not moaning, just curious. Valid comment. That is, fgldb does not handle compound arguments, such as arguments in quoted strings, very well. Also, in many releases, fgldb would miscalculate the number of arguments if you used, for example, a date with delimiters. NUM_ARGS() would count "95/01/24" as either 3 or 5 arguments (I forget which), but ARG_VAL() would correctly detect just the one argument. This caused problems debugging any program which took its argument list seriously. I believe this was fixed in 4.12/6.00, but it could have been in an earlier release. MAIN DEFINE i, n INTEGER DEFINE s CHAR(20) LET n = NUM_ARGS() FOR i = 0 TO n LET s = ARG_VAL(i) DISPLAY "Arg ", i USING "&", " is: <<", s CLIPPED, ">>" END FOR END MAIN Given that the program above was called kk.4gl and running FGLDB version 4.12.UE1 on Solaris 2.3, the following debugger command line produces the output shown: run 12/31/95 41 "11 22 33" 'qqq aaa' Arg 0 is: <<kk>> Arg 1 is: <<12/31/95>> Arg 2 is: <<41>> Arg 3 is: <<11 22 33>> Arg 4 is: <<qqq aaa>> This looks impeccably correct to me. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>