Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GLGDW 2006 - April 21-24, Milwaukee
Message
De
19/01/2006 08:11:35
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
18/01/2006 17:54:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Conférences & événements
Divers
Thread ID:
01078694
Message ID:
01088332
Vues:
52
>Three variables are assigned a value, but I doubt whether the third one adds value to the code.
>
local llOK, lcMsg, lcName
>llOK = .T. && this assignment of a default is necessary
>lcName = '' && this assignment of a default might be useful
>lcMsg = '' && is this assignment of a default useful?
>if whatever
> lcMsg = 'message 1'
>else
> lcMsg = 'message 2'
>endif


It can't hurt and it would help if the code was concatenating content...

m.lcMsg = ''
FOR m.lnX = 1 TO 10
m.lcMsg = m.lcMsg + laMsgs[m.lnX]
ENDFOR m.lnX

Seems like a very good habit to me. Clarity is a good thing.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform