| Subject |
Re: strange behavior(RESULT) at the command box |
| From |
Akshat Kapoor <akshat.kapoor@kapoorsons.in> |
| Date |
Sun, 9 May 2021 21:57:41 +0530 |
| Newsgroups |
dbase.getting-started |
| Attachment(s) |
Screenshot 2021-05-09 212340.jpg |
Good Evening Agostinho, Gaetano, Niall,
>>> Dear group your assistance for the following:
>>>
>>> I suspend my program at certain point. and type the following in the
>>> command box I get the following result
>>> Why this behivar?
>>>
>>>
>>>
>>> ?form.users1.rowset.fields["NAAM"].VALUE
>>> AGOSTINHO
>>>
>>> ?form.users1.rowset.fields["NAAM"].VALUE="AGOSTINHO"
>>> false
>> Hi Agostinho
>>
>> Try
>>
>> ? RTRIM(form.users1.rowset.fields["NAAM"].VALUE) = "AGOSTINHO"
>>
>> Regards
>>
> if that fixes the issue, SET EXACT is ON, which is not the usual value
> for this setting. It is more flexible to SET EXACT OFF (the default
> value in dBase) and use the == operator to assess exact matches when
> required. Just my opinion of course.
>
> To visualize any trailing spaces or unexpected characters, you might
> want to add delimiters to the output, e.g.
>
> ?"|"+form.users1.rowset.fields["NAAM"].VALUE="AGOSTINHO"+"|" or
> ?"|"+rtrim(form.users1.rowset.fields["NAAM"].VALUE="AGOSTINHO")+"|" or
> ?"|"+ltrim(rtrim(form.users1.rowset.fields["NAAM"].VALUE="AGOSTINHO"))+"|",
> just in case there are leading spaces too...
I agree with the suggestions of Gaetano to add some visible characters
but I do not agree with his suggestion of set exact off (My choice is
set exact on) as it is damn easy to use = in place of == and the result
can cause heart burn.
I did check with set exact on the commands I used and the results are
attached as screenshot.
Set exact is not the culprit there must be some unprintable control
characters in the string that could be causing the issue.
I have checked by adding spaces also.
Regards
Akshat
|

|
|