Lindsay, You can not do a simple LEN check, otherwise
X = " 1" Y = "1 " X = Y would be true The "problem" I believe is that the runtime engine tries for a numeric match first, rather than strict character match. So the "trick" is to force a character match, so X:"X" = Y:"X" is false, which is what you "really" want I think Ross Ferris Stamina Software Visage an Evolution in Software Development >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:owner-u2- >[EMAIL PROTECTED] On Behalf Of Lindsay Gregory >Sent: Thursday, 13 May 2004 12:29 PM >To: [EMAIL PROTECTED] >Subject: [U2] SPACE character ignored > >Hi > > > >I am sure this has been covered somewhere before but I could not find under >oliver.com or u2ug.org. > > > >Can anyone tell me why: if > > > >X = '1' > >Y = '1 ' ;* note the trailing space character > > > >X = Y is true > > > >But if > > > >X = '' > >Y = ' ' > >X = Y is false > > > >So adding a space character to a text string is ignored but adding a space >character to a null is not ignored. > >I can understand why X = '' is not equal to Y = ' ' because X is not a >text >string but if in the first case - the text string Y has two characters - a >one and a space and the text string X has only one character how can they >be >equivalent. > > > >My guess is that by the time they come to be tested for equivalence they >have been converted to numeric values and are being tested for numeric >equivalence. > > > >How can I force them to be tested for TXT equivalence? > > > >Do I have to say: > > > >IF X = Y AND LEN(X) = LEN(Y) THEN true > > > >Except if X = ' 1' and Y = '1 ' then LEN(X) = LEN(Y) ... > > > >It seems that leading or trailing spaces are ignored (but not embedded >spaces) so I have to say > > > >IF LEN(X) = LEN(TRIM(X)) AND LEN(Y) = LEN(TRIM(Y)) AND X = Y THEN true > > > >There has got to be an easier way !! > > > >Lindsay Gregory > >Axys (NZ) Ltd > >www.axys.co.nz > >Ph: +64 9 5200264 > >Fax +64 9 5200266 > >Mob +64 21 770 462 >------- >u2-users mailing list >[EMAIL PROTECTED] >http://www.u2ug.org/listinfo/u2-users > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.682 / Virus Database: 444 - Release Date: 11/05/2004 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.682 / Virus Database: 444 - Release Date: 11/05/2004 ------- u2-users mailing list [EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users
