Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLSERVER Rollback
Message
De
04/01/2019 03:12:41
 
 
À
03/01/2019 18:12:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01665065
Message ID:
01665106
Vues:
63
>Hi Tamar,
>
>And here I was starting to change all my code that used your preferred syntax (option 1 below) with the 2nd - thinking that the 2nd would be more readable to someone else taking over my code! Is there any consensus out there as to what is the "best" way to code this? Or if not a consensus, what do most VFP do?
>
>I have always done method number 1 below until just a few months ago when I thought I should change...
>
>Albert
>
>>
>>IF NOT MyFlag
>>
>>
>>than
>>
>>
>>IF MyFlag = .F.
>>
>>
>>Tamar


1. if both alternatives are processed, you may want to write the positive comparison first:
if myFlag
else
endif
2. explicit naming makes it more readable:
if success
else && error
endif
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform