Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Single line vs multiple lines assignment
Message
De
09/02/2011 15:43:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
08/02/2011 11:53:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01499222
Message ID:
01499457
Vues:
55
>I prefer the first, with separate assignments for each property (or variable).
>
>I do not find the second more readable -- for me, switching the order, where the value assigned is now on the left, and the property assigned to on the right, goes against the grain.
>
>I also tend to do searches, whether it be using Code References or Ctrl+F, and the second syntax makes assignments harder to find. (I can search for 'x = ' easily enough, but it's much harder to see how to search for assignments using the second alternative.)

Actually, searching for "x=" is equally easy as searching for "x =" and "x{tab}="... and all three are valid, and (depending on coding style) more or less possible to find in code. So instead of three, you need to search for four.

But I'd never search for x=. Too short a name for a variable.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform