Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code Standards
Message
From
02/10/2003 19:39:56
 
 
To
02/10/2003 18:14:37
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
COMCodebook
Title:
Miscellaneous
Thread ID:
00832733
Message ID:
00834596
Views:
41
Sure, that does the job too.

Now keep in mind that with my 'standard' anything beyond 4 conditions (truly possibly complex by then) but retaining the 4-position indent (I see you use 2) the code after the conditions still stands out yet is in it 'normal' place.
One of the reasons that I find this helpful is that only IFs have this characteristic in **my** coding standard.

cheers


>Scratch that. I hit send before I finished.
>
>
>if m.x = 2 ;
>     and m.y = 3 ;
>      and m.z = 4
>  *something
>endif
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform