Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yoda coding styles
Message
De
24/04/2006 11:24:43
 
 
À
24/04/2006 09:53:26
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01115355
Message ID:
01116014
Vues:
21
Is YODA an acronym? Such as (Y)our (O)wn (D)arned (A)ttempt to code?


>>>I think it's a toss-up. If you put the commas at the end, you can still move the lines around easily except for the last one.
>>>
>>>
select ;
>>>  field1, ;
>>>  field2, ;
>>>  field3 ;
>>>
>>>If you put the commas at the front, you can move the lines around easily except for the first one.
>>>
>>>
select ;
>>>  field 1 ;
>>>  , field2 ;
>>>  , field3 ;
>>
>>In practice, it very rarely comes to moving the first. Specially in my case, when the resulting cursor may be used to pop up a little selector grid - where I limit the number of columns, but may need additional fields. In most of such cases, the first couple of fields are decided long in advance, but the rest is added freely as needed. In some cases I'm gathering a transaction history from a dozen of tables with similar structures - and again it's never the first fields that need to be messed with, but towards the end of the list it undergoes several changes. And if I'm adding a field after the last, I don't need to go into the previous line to add the comma. Saves me a lot of time and debugging.
>
>That seems very wise. Thanks!
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform