Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The color of comments in your code window
Message
From
18/08/2009 15:46:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
18/08/2009 15:05:37
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01418690
Message ID:
01418756
Views:
76
>Text color in the editor is a personal preference, but I appreciate your blogging about things that people may not have thought of.
>
>However, I feel the need to add some things that affect comments
>
>1. There are several lines that look like:
>
*-- Some text here ------------------------------------------------------
>Adding all the dashes doesn't make it more or less of a comment. It just adds addtional characters that distract and add to the comment problem.

That style may make sense in places where you have a long prg where several classes, or several groups of related routines reside. A long comment like that may help to delineate them when scrolling - though Document View makes this mostly unnecessary. I do such long lines in log files (when logging into a textfile), to point out phases, when something started or ended. Helps eyeballing. For code, I agree with your doubts.

>2. Lots of code like:
>
*-- Create some object -------------------------------------------------
>IF SomeCondition
>    this.GetSomething(someParameter)
>ENDIF
>
>*-- Create some other object -------------------------------------------------
>IF SomeOtherCondition
>    this.GetSomethingElse(someParameter)
>ENDIF
Rox's Rule on Comments: don't tell me what you are doing, I can read code. Tell me why are you doing it (or why in a non-standard way, so I don't try to fix it).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform