473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

what is the most effortless way to add a description comment to a function

Currently, whenever I write a new function, I have to copy and paste
/************************************************** ****************
* description of function
************************************************** ****************/
void foo ()
{
}

Is there a way to automatically generating the stars making up the
comment box? If its of any help, i use emacs.

Aug 11 '05 #1
3 1320
bl**********@gmail.com wrote:
Currently, whenever I write a new function, I have to copy and paste
/************************************************** ****************
* description of function
You mean, _literally_ those words? What's the point?
************************************************** ****************/
void foo ()
{
}

Is there a way to automatically generating the stars making up the
comment box?
I bet there is. Right next to that button that automatically generates
the function for you... Oh, did you mean you don't actually generate the
function automatically? Well, if you have to type the function, you must
realise that typing (or copy-pasting) the comment is essentially the only
way to go.
If its of any help, i use emacs.


Oh, of course it is of help. Go to the emacs newsgroup to ask about it.
You can probably write a script and tie it to a key somehow...

In C++ comments do not really serve any need, they are removed from the
code on very early stages of compilation, so the language does not have
any means to _create_ comments. BTW, if you haven't noticed, this is
a _language_ newsgroup.

V
Aug 11 '05 #2
bl**********@gmail.com wrote:
Currently, whenever I write a new function, I have to copy and paste
/************************************************** ****************
* description of function
************************************************** ****************/
void foo ()
{
}

Is there a way to automatically generating the stars making up the
comment box? If its of any help, i use emacs.

Try asking in an emacs newsgroup.
Aug 11 '05 #3
wee
I've seen automatic comment generation when you use IDEs such as Visual
Studio.

Otherwise, you could write a program that will read in your code
classes, find where each function starts, and add a description segment
above it (which you would then have to fill in for each specific
method). You could write this in Perl or Python, for instance.

Aug 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: L Mehl | last post by:
Hello -- I am not yet an advanced SQL code writer. Can someone help me add the extended property 'Description' to a list of columns resulting from this code? SELECT...
2
by: Relaxin | last post by:
How do you add a comment description to your functions and properties so that they will show up when you use the Intellisense QuickInfo or member list? I've tried regular C++ comments but that...
6
by: cdrsir | last post by:
we can use 1) // my comments a 2) /* my comments b */ when we want to add some comments. I know some compilers just support the 2nd syntax, but normally both of these 2 syntaxs are supported...
4
by: patrickparent | last post by:
I'm looking for a way to add comment directly in the tooltip that pops when you type a function and you have to insert parameters. Like the tooltips you have when you create a new ArrayList ...
98
by: tjb | last post by:
I often see code like this: /// <summary> /// Removes a node. /// </summary> /// <param name="node">The node to remove.</param> public void RemoveNode(Node node) { <...> }
22
by: gillisct | last post by:
I'd like to say I have a basic control of the C language. Is there any reccomended reading upon completion of K&R? Are there any projects someone new to C could study/watch over/ and eventually...
1
by: Xennex | last post by:
I've searched high and low and found no article on the web in English or Japanese to explain what I could use to display some help for a function (or subroutine) in the popup that appears when...
2
by: church7 | last post by:
Hello, I wrote the following class: In this case, the error message was
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
0
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...
0
isladogs
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.