Re: Is this a bug w/ 4GL 4.10
Posted in 1993
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
In article <1993Jul29.203515.28443@ra.oc.com> jmaddox@mistxt.oc.com (John Maddox) writes: > >The following program compiles but does not work as i expect... >Is it me? (or is this a bug?) > > ># bug.4gl ># --------------------------------- >globals >define x char(100) >end globals > >main > >let x = " " > ># below compiles but doesn't seem to do anything ># ># don't want to have to code: ># ># if x = " ... one hundred blanks" then > >if x clipped = "" then > display "x is blank" > end if > >end main I tested this and found that the following yeilded the desired result: IF x CLIPPED = " " THEN ... END IF Since CLIPPED "removes trailing blanks" my hypothesis is: when CLIPPED is used for instance in an IF statement, it is assumed that the first blank is a "leading character" rather than a "trailing blank" thus preserving the first character. Maybe this has something to do with nulls? I also found that: LET ch1 = " " LET ch2 = ch1 CLIPPED DISPLAY "start", ch2, "end" yielded: start end I looked through my maunals but they don't seems to say a whole lot about this. While we are on the subject of bugs/features, I accidentally discovered that CONTROL-4 from within isql exits back to the commandline. I don't recall reading about this "feature" in any documentation so I am curious as to whether this is supposed to work this way. I am running version 4.0 on a vt320 with vt100 emmulation, OS is Ultrix 4.3. Thanks for your time. -Todd >-- >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >John Maddox jmaddox@mistxt.oc.com 214-888-0476 > OpenConnect Systems -- = Todd A. Bernhardt = =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= = = Wheaton College = "Might have been is but ashes upon the wind." = = bernha@david.wheaton.edu = --Daughter of the Empire = = (708) 752-5232 = =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= =