Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code Standards
Message
From
01/10/2003 20:06:01
 
 
General information
Forum:
Visual FoxPro
Category:
COMCodebook
Title:
Miscellaneous
Thread ID:
00832733
Message ID:
00834042
Views:
34
>>And as for:
>>
>>"This is line 1." + ccCRLF ;
>>   + "This is line 2."
>>
>>In this case, we are stricter than most. We STRONGLY adhere to placing the '+' at the beginning of the additional line as in the example above so you can easily tell that the 2nd line is a continuation of the previous line. That to us is much more readable.
>
>I agree with this format, too, but for another reason. When you need to remove a condition from a list of conditions, you can remove the line cleanly. The only time you need to edit the previous line is if it's the last one that's being remove.

Huh? Isn't the same true when the + is at the end?! Like in...
*  Note that the text actually starts on the 2nd line.
lcMsg = ;
   "This is line 1." + ccCRLF + ;
   "This is line 2." + ccCRLF + ;
   "This is line 3." + ccCRLF + ;
   "This is line 4."

*  If I simply remove message line 3, I get ...
lcMsg = ;
   "This is line 1." + ccCRLF + ;
   "This is line 2." + ccCRLF + ;
   "This is line 4."

*  It even works if I remove message line 1!
lcMsg = ;
   "This is line 2." + ccCRLF + ;
   "This is line 3." + ccCRLF + ;
   "This is line 4."
>Same applies for AND/OR situations.
>
>IF x=0 ;
>   AND y=1 ;
>   AND z=2
>ENDIF
>
>easily becomes
>
>IF x=0 ;
>   AND z=2
>ENDIF
>
In this case I agree. Although it's my strong opinion that the AND line should NOT be indented!
IF  x=0 ;
AND y=1 ;
AND z=2
   WAIT WIND "kiekeboe"
ENDIF
>I also try to indent continuations lines to a more logical (to me) position after the first keyword of the statement, like the above or:
>
>SomeVar = "Part1" ;
>          + "Part2" ;
>          + "Part3"
>
Agree. Although, under cisrcumstances, I prefer...
SomeVar = ;
   "Part1" + ;
   "Part2" + ;
   "Part3"
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform