Page 1 of 1
String with Len 0
Posted: Thu Oct 31, 2024 3:01 pm
by Horst
Hello
aMessgeraet [nCnt][02] is empty and sLen = 0
cUsername is not empty
IF aMessgeraet [nCnt][02] = cUsername -> false
IF cUsername = aMessgeraet [nCnt][02] -> true
This shoud be a bug ?
i have xsharp (2.18.0.4)
Horst
Re: String with Len 0
Posted: Thu Oct 31, 2024 9:58 pm
by Chris
Hi Horst,
It's not a bug in the sense that this is how VO works, too, with the partial equality operator when there's a usual involved.
If you want to test for absolute equality, you need to use the == operator. Or you can turn SetExact(TRUE).
Re: String with Len 0
Posted: Fri Nov 01, 2024 10:56 am
by Horst
Hi Chris
I know when i compare "Horst " = "Horst" or "Horst" = "Horst " then is the result different, but a empty string ? Thats weird for me.
Horst
Re: String with Len 0
Posted: Fri Nov 01, 2024 12:44 pm
by Chris
Hi Horst,
Well, VO is extremely weird at times
I agree, it does not make much sense, but we had to implement it the same way as in VO, otherwise it would certainly break existing (ported to X#) code.
Re: String with Len 0
Posted: Sat Nov 02, 2024 6:08 am
by robert
Horst,
Horst wrote: ↑Fri Nov 01, 2024 10:56 am
Hi Chris
I know when i compare "Horst " = "Horst" or "Horst" = "Horst " then is the result different, but a empty string ? Thats weird for me.
Horst
Actually, this was "inherited" from dBase (so from the 80s)
Robert