Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Empty string value
Message
De
24/03/2009 21:00:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
24/03/2009 20:22:07
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01391254
Message ID:
01391257
Vues:
51
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform