![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
It's just one of those frustrating things. Can anyone please explain why, in VPF3.0b, the comparison of two fields (one blank, one completed) :- (n_add1)=(add1) returns false, but trim(n_add1) = trim(add1) returns true |
#3
| |||
| |||
|
|
It's just one of those frustrating things. Can anyone please explain why, in VPF3.0b, the comparison of two fields (one blank, one completed) :- (n_add1)=(add1) returns false, but trim(n_add1) = trim(add1) returns true Thanks Mike [The reply-to address is valid for 30 days from this posting] |
#4
| |||
| |||
|
|
it's in all vfp versions... it's by design. |
|
when you do the first comparisioin, they are (i'm guessing) equal lengths. The string comparisions does a character comparison and fails. when you TRIM() the strings, now one string is empty. The character by character comparaion stops before it starts becuase one string is empty.... so it's true. Swap the two, and it'll be false.. Use == instead if you want to make sure they're exactly teh same. btw: Everyone generally feels vfp3 was just a "preview" version of vfp5 (not even a beta... I'd upgrade) |
![]() |
| Thread Tools | |
| Display Modes | |
| |