For several years now, "folding" has become more and more
common in text editors. That has had an affect on my
commenting style. For example, the appealing layout:
int
foo(void)
{
/** Brief explanation of foo.*/
....
}
has now changed to:
int
foo(void)
{ /** Brief explanation of foo.*/
....
}
I find the second layout ugly, but when you fold based on brackets,
the comment remains visible, while the comment in the first layout
gets hidden in the fold. Similarly,
if (expr) {
/* brief comment*/
statement;
}
Is now more convenient to write with the comment on the line with
the open brace.
I'm curious to know how folding is affecting people's sylistic
conventions. 5 1503
Bill Pursell wrote: For several years now, "folding" has become more and more common in text editors. That has had an affect on my commenting style. For example, the appealing layout:
int foo(void) { /** Brief explanation of foo.*/ ... }
has now changed to: int foo(void) { /** Brief explanation of foo.*/ ... }
I find the second layout ugly, but when you fold based on brackets, the comment remains visible, while the comment in the first layout gets hidden in the fold. Similarly,
if (expr) { /* brief comment*/ statement; }
Is now more convenient to write with the comment on the line with the open brace.
I'm curious to know how folding is affecting people's sylistic conventions.
I can't really think of where this belongs (perhaps comp.programmer),
so I'll just reply to it instead of complaining about your
offtopicness.
I have always used vi, and continue to do so. All of my folding text
editors (Notepad++ when I'm on Windows) allow me not to fold, and so I
don't. My style remains the same regardless of text editor trends.
Folding is only useful for when you need to scan for functions;
comments explaining the purpose of a function belong above the header,
and so won't be folded anyway.
On 13 Apr 2006 13:43:08 -0700, "Bill Pursell" <bi**********@gmail.com>
wrote: For several years now, "folding" has become more and more common in text editors. That has had an affect on my commenting style. For example, the appealing layout:
int foo(void) { /** Brief explanation of foo.*/ ... }
has now changed to: int foo(void) { /** Brief explanation of foo.*/ ... }
I find the second layout ugly, but when you fold based on brackets, the comment remains visible, while the comment in the first layout gets hidden in the fold.
My preferred method is to put the comment above the definition,
unaffected by the folding.
Similarly,
if (expr) { /* brief comment*/ statement; }
Is now more convenient to write with the comment on the line with the open brace.
I'm curious to know how folding is affecting people's sylistic conventions.
--
Al Balmer
Sun City, AZ
Bill Pursell wrote: For several years now, "folding" has become more and more common in text editors. That has had an affect on my commenting style. For example, the appealing layout:
int foo(void) { /** Brief explanation of foo.*/ ... }
has now changed to: int foo(void) { /** Brief explanation of foo.*/ ... }
I find both ugly. My preferred convention is:
/** Brief explanation of foo.*/
int foo(void)
{
...
}
I've been doing this since even before I started using a folding editor
so it doesn't affect my style. It's from the good old assembly days to
comment on your intention before the actual code. Besides this
convention is more easily digestable by auto-documenting tools like
doxygen.
"sl*******@yahoo.com" <sl*******@gmail.com> writes: Bill Pursell wrote: int foo(void) { /** Brief explanation of foo.*/ ... }
I find both ugly. My preferred convention is:
/** Brief explanation of foo.*/ int foo(void) { ... }
I use comments above the function definition (the former style,
roughly) to describe the function's interface, and comments
within the function definition (the latter style, roughly) to
describe the function's implementation.
--
"What is appropriate for the master is not appropriate for the novice.
You must understand the Tao before transcending structure."
--The Tao of Programming
On Fri, 14 Apr 2006 08:05:20 -0700, Ben Pfaff <bl*@cs.stanford.edu>
wrote: "sl*******@yahoo.com" <sl*******@gmail.com> writes:
Bill Pursell wrote: int foo(void) { /** Brief explanation of foo.*/ ... }
I find both ugly. My preferred convention is:
/** Brief explanation of foo.*/ int foo(void) { ... }
I use comments above the function definition (the former style, roughly) to describe the function's interface, and comments within the function definition (the latter style, roughly) to describe the function's implementation.
I've always done the "above the definition" comments, and find it
especially nice that my editor, if you hover the mouse over a function
name, will pop up the comment block preceding the function definition.
--
Al Balmer
Sun City, AZ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jouke Langhout |
last post by:
Hello all!
For quite some time now, I've got the following problem:
Access won't close properly when a user closes the application. An
ACCESS process stays active and that process can only be...
|
by: Colleyville Alan |
last post by:
I am using Access and have embedded the ActiveX control Formula One that
came with Office 2000. (ver 3.04). I have created and formatted a
spreadsheet and now I want to copy the info with...
|
by: DBQueen |
last post by:
I have a subform which is in Continuous Forms view.
I have added a button to the bottom of the page to move to the next record
using the button wizard (result: DoCmd.GoToRecord , , acNext).
I...
|
by: Bradley |
last post by:
I have an A2000 database in which I have a continuous form with a tick
box. There is also a text box with a conditional format that is based on
the expression , if it's true then change the...
|
by: GGerard |
last post by:
Hello
Is there a way to use a variable in the Conditional Formatting of a Textbox?
Example :
I want the background of a textbox in a continuous form to change color when
the value of...
|
by: hope |
last post by:
Hi,
How can I format a string field using Data Formatting Expression property in
datagrid?
For example: format last name from BROWN to Brown.
Thanks
|
by: L. Scott M. |
last post by:
Have a quick simple question:
dim x as string
x = "1234567890"
-------------------------------------------------------
VB 6
dim y as string
|
by: gopal |
last post by:
Hi
I am trying to write to log file but the formatting of string is not
properly aligned in log file result
The results looks some thing like this
OK move.xml Successful
OK ...
|
by: Typehigh |
last post by:
I have many text fields with conditional formatting applied,
specifically when the condition is "Field Has Focus". Without any
events associated with the fields the conditional formatting works...
|
by: midlothian |
last post by:
Hello,
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |