Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code Standards
Message
De
02/10/2003 18:12:25
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
02/10/2003 17:47:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COMCodebook
Titre:
Divers
Thread ID:
00832733
Message ID:
00834570
Vues:
45
Hiya Jim

Here's my understanding of Drew Speedie's indentation. It is what I'm using in any case.
IF x = 2 ;
     and y = 3 ;
     and z = 4
  *Something
ENDIF
Now that I've seen yours, I think a derivative would be good ;)
if m.x = 2 ;
     and y = 3 ;
       and z = 4
  *Something
endif
It indicates a complex if and the something jumps right out because of the white space above it.

BTW, this stuff is truly subjective. There is no performance issue except we could probably run some studies to see if programmer's can read faster depending on the formatting.

>>>snip
>>>Since I haven't seem mine...
>>>
*   Fred's indentation:
>>>IF x = 2 ;
>>>   AND y = 3 ;
>>>   AND z = 4
>>>   *
>>>   a = 12345765
>>>ENDIF
>>>
>>>*   your indentation:
>>>IF  x = 2 ;
>>>AND y = 3 ;
>>>AND z = 4
>>>   *
>>>   a = 12345765
>>>ENDIF
>>>
>>>*    my indentation
>>>IF m.x = 2    ;
>>> AND m.y = 3  ;
>>>  AND m.z = 4 ;
>>>   AND m.a = 5
>>>    a = 1234567
>>>ENDIF
>>
>>Where is the smiley! You must be joking. Or are you dead serious? (I had to laugh, really. I hope you don't think this is offending. :)
>
>I don't mind anything. I know especially when one jumps into THIS topic that anything can happen and is fair game.
>That said, I **AM** serious. ***I*** think that it makes possibly more complex IF statements easier to spot and my objective is to maximize every aspect of readability that I can.
>cheers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform