LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-01-2012, 06:12 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
prototyping c functions


Dear all,
I would like to ask you about prototypinc c functions.


In R for example, we have prototyped the way we write functions, how we add comments, how we define function names e.t.c

Then a Roxygen system parse that files and creates the dependencies between all the source files.

Do you have some good articles or few suggestions of how do the function prototyping (where to write commetns for a function, add author details) for c language?

I would like to thank you in advance for your help

B.R
Alex
 
Old 05-01-2012, 06:51 AM   #2
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
I'm unfamiliar with the term prototyping for c? So am guessing you mean ( for me ) either testing or by your post style? For style there's a whole load of styles K&R and dozens of others. He's the first example from google http://google-styleguide.googlecode....k/cppguide.xml, http://en.wikipedia.org/wiki/Programming_style, http://en.wikipedia.org/wiki/Indent_style#K.26R_style, http://www.jetcafe.org/jim/c-style.html, http://en.wikibooks.org/wiki/C++_Pro...tions/Comments.
 
Old 05-01-2012, 08:45 AM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
A function prototype is the function signature, return types and args, without the method body. This is generally found in the header files. Most companies / projects have standard ways of doing this. A quick google search on 'C function header comments' produced a lot of examples, that is a good place to start.
 
Old 05-01-2012, 09:59 AM   #4
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
I also mean how do you write comment about what a function returns, how to use it, give a small example.. and the present that to the programmer as part of "api"
 
Old 05-01-2012, 12:11 PM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You use Roxygen for R, so why not Doxygen for C?
 
Old 05-01-2012, 03:18 PM   #6
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
I will check it and send more thoughts tomorrow.

Take Rest
Alex
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sketching and Prototyping with Pencil (FireFox add-on) LXer Syndicated Linux News 0 08-10-2010 04:10 PM
LXer: OpenOffice Renaissance prototyping phase drawing to close LXer Syndicated Linux News 0 07-21-2009 11:40 AM
LXer: OpenOffice.org Calc functions, part 1: Understanding functions LXer Syndicated Linux News 0 03-31-2007 12:01 PM
LXer: Serious Cluster Design and Prototyping LXer Syndicated Linux News 0 07-17-2006 08:33 PM
pointers to functions/member functions champ Programming 2 03-28-2003 06:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration