Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Empty string value
Message
From
24/03/2009 21:00:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
24/03/2009 20:22:07
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01391254
Message ID:
01391257
Views:
50
>Hello comunity
>
>I have the following code when a save a new record that found the max(number ) of my check and sum +1 only if :
>
>if lp.leno = 0 and len(alltrim(lp.u_stamppo)) = 0 and lp.u_movabert = .F.

lp.u_moveabert = .F. could also be written as not lp.u_movabert.

Try to put the last part in parentheses, thus:
if lp.leno = 0 and len(alltrim(lp.u_stamppo)) = 0 and (lp.u_movabert = .F.)
This is because I am not sure about operator precedence (between "=" and "and"). Perhaps the entire previous part is evaluated first, and then compared to the logical value ".F.".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform