Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Padded strings
Message
From
04/01/2002 09:09:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/01/2002 05:29:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00600660
Message ID:
00600713
Views:
21
>If I allocate a string to a variable or a property i.e thisform.myprop = "test" and then try the following :
>
>if thisform.myprop = "test"
> do something
>endif
>
>This always fails. What have to do is :
>
>if alltrim(thisform.myprop) = "test"
> do seomething
>endif
>
>Is there any way I can stop VFP padding these strings out?
>
>Thanks in advance
>
>Pablo

Paul,
Are you sure ? VFP doesn't pad unless told to do. Even if it were padded :
if thisform.myprop = "test"
would return .t. whether set exact ON/OFF.

PS: You could use :

if thisform.myprop == "test" && instead of trim()

With alltrim() you're trimming leading spaces too. Might that be your problem ?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform