Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't see what changed
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00527148
Message ID:
00528598
Views:
23
>>>>
>>>>I remember spending over half a day on a problem in VFP5. It was as if the line hadn't been written. No warning, nothing. Thought and thought about it. Put in a space before the semi-colon just for grins and everything worked. Up until then I had never put in the space. One of my friends then told me about this oddity. Seems like this bug doesn't always bite. Just once in a while and that's enough.
>>>
>>>I agree. I *always* put a space before the semicolon, but I use lots of whitespace anyway. Always one after a comma, around +, =, *, etc. It makes the code much more readable. I also do continuation lines differently than most VFP programmers. Here are a couple of examples:
>>>
>>>Most of the code I've looked at does this:
>>>
>>>MyVar = "Some really, really, really, " + ;
>>>  "really, really long string"
>>>
>>>IF ThisVar = SomeValue AND ;
>>>  ThatVar = SomeOtherValue
>>>
>>>
>>>I code it this way:
>>>
>>>MyVar = "Some really, really, really, " ;
>>>  + "really, really long string"
>>>
>>>IF ThisVar = SomeValue ;
>>>AND ThatVar = SomeOtherValue
>>>
>>>
>>>The differences are subtle, but, IMO, my way is much easier to read. It makes it clear by looking at the beginning of the line that it is a continuation. You may not see it here, but try it my way in the middle of a program with many lines before and after. You'll see the difference.
>>
>>Craig,
>>
>>You knew I couldn't resist, didn't you.< bg >
>>
>>The stuff about the math operators and commas I'll defintely agree with. However, about the line continuation I'll disagree. IMO, I think placing the + or the logical operator at the end of the line makes it easier to read. I think that it's easier to miss a single character like the semi-colon doing a quick read as opposed to two (+ ;) or more (AND ;). However, there's nothing wrong with your method. Just different strokes for different folks.:-)
>
>My $0.02 is that I agree with Craig (except I indent continuation lines - the AND starting a new line gives me the creeps < s >).

I do indent (as I mentioned to Craig) continuation lines. Again, I think an argument can be made for either way.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform