Re: NULL in variable defined AS STRING
Mike Aubury <[email protected]> Mon, 28 Apr 2025 10:28:09 +0100
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WGVOMXSjut_Pd3T-=UKUy9y=JoCAWwtn2WwqdZntqhteQ@mail.gmail.com> |
--===============8310541909192261283== Content-Type: multipart/alternative; boundary="000000000000ff628c0633d34d30" --000000000000ff628c0633d34d30 Content-Type: text/plain; charset="UTF-8" I think its just a very minimal implementation of "STRING" - it probably wouldnt take a lot to implement STRING more fully - but doubt it will ever have the coverage of the CHAR() and VARCHAR datatype etc - as I never used it! On Mon, 28 Apr 2025 at 08:09, Iwan AB <[email protected]> wrote: > Dear Mike, please consider the following code: > > MAIN > DEFINE s1 STRING, s2 CHAR(100) > > LET s1 = NULL > IF s1 IS NULL THEN > DISPLAY "s1 IS NULL!" > ELSE > DISPLAY "s1 IS NOT NULL!" > END IF > > LET s2 = NULL > IF s2 IS NULL THEN > DISPLAY "s2 IS NULL!" > ELSE > DISPLAY "s2 IS NOT NULL!" > END IF > > END MAIN > > it displays s1 IS NOT NULL! and s2 IS NULL, why is that? > > Best regards, > > Iwan Abu Bakar > _______________________________________________ > Aubit4gl-discuss mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss > --000000000000ff628c0633d34d30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I think its just a very minimal implementation of "ST= RING" - it probably wouldnt=C2=A0take a lot to implement STRING more f= ully - but doubt it will ever have the coverage of the CHAR() and VARCHAR d= atatype etc - as I never used it!</div><br><div class=3D"gmail_quote gmail_= quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, 28 Apr 2025 = at 08:09, Iwan AB <<a href=3D"mailto:[email protected]">[email protected]<= /a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0= px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><= div dir=3D"ltr">Dear Mike, please consider the following code: <br><br>MAIN= <br>=C2=A0 =C2=A0 DEFINE =C2=A0s1 STRING, s2 CHAR(100)<br><br>=C2=A0 =C2=A0= LET s1 =3D NULL<br>=C2=A0 =C2=A0 IF s1 IS NULL THEN<br>=C2=A0 =C2=A0 =C2= =A0 =C2=A0 DISPLAY "s1 IS NULL!"<br>=C2=A0 =C2=A0 ELSE<br>=C2=A0 = =C2=A0 =C2=A0 =C2=A0 DISPLAY "s1 IS NOT NULL!"<br>=C2=A0 =C2=A0 E= ND IF<br><br>=C2=A0 =C2=A0 LET s2 =3D NULL<br>=C2=A0 =C2=A0 IF s2 IS NULL T= HEN<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 DISPLAY "s2 IS NULL!"<br>=C2= =A0 =C2=A0 ELSE<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 DISPLAY "s2 IS NOT NULL= !"<br>=C2=A0 =C2=A0 END IF<br><br>END MAIN<br><br>it displays s1 IS NO= T NULL! and s2 IS NULL, why is that?<div><br></div><div>Best regards,</div>= <div><br></div><div>Iwan Abu Bakar</div></div> _______________________________________________<br> Aubit4gl-discuss mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss" r= el=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/lis= tinfo/aubit4gl-discuss</a><br> </blockquote></div> --000000000000ff628c0633d34d30-- --===============8310541909192261283== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8310541909192261283== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss --===============8310541909192261283==--