Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check Numeric
Message
From
08/09/2004 05:41:25
 
 
To
08/09/2004 05:31:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00939224
Message ID:
00940217
Views:
16
Hi again Fabio,

in England they drive on the left side, is that a bug? They simply can not change the behavior of VFP without affecting programs, mine included. Shoot the designers of dBase, not MSFT. :-)

>
>Well, then it is a documented one. It surprised me at first, but then, it's not that surprising at all.
>Char fields are right padded with blanks. So empty() does not know whether you inserted space(0) or space(4) for char fields. But for memo fields it does.
>
>It's all described in the help.
>
>Still, it's tricky
>
>create cursor ppp(ppp M)
>insert into ppp (ppp) values (space(4))
>?empty(ppp) && FALSE
>qqq=ppp
>?empty(qqq) && TRUE !!
>

>
>Well, then it is a design bug documented one!
>
>With this, ISBLANK() and EMPTY() are equal for a memo;
>then , if ISBLANK() can do this, why make confusion in the EMPTY() ?
>None sense, a design bug.
>
>Correct implementation is :
>
>clear
>create cursor ppp(ppp M)
>
>APPEND BLANK
>? isblank(ppp),empty(ppp) && expected .T. , .T.
>
>insert into ppp (ppp) values ('')
>
>? isblank(ppp),empty(ppp) && expected .T. , .T.
>
>insert into ppp (ppp) values (' ')
>
>? isblank(ppp),empty(ppp) && expected .F. , .T.
>
>SCATTER MEMO MEMVAR
>
>? isblank(m.ppp),empty(m.ppp) && expected .T. , .T.
>
>
>Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform