CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

void abc(void)vs void abc()

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
project2010



Joined: 14 Mar 2010
Posts: 21

View user's profile Send private message

void abc(void)vs void abc()
PostPosted: Wed Mar 31, 2010 11:48 am     Reply with quote

What is the difference between it?

Also something I see put some data into () like> (int8 data),(float data)
somethime start with int8 data(void)?

What case should I place something into ()?

Thank you
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 31, 2010 12:11 pm     Reply with quote

Look in this C reference:
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/ARH9NATE/DOCU_012.HTM#func_define_sec
Search for this string.
Quote:

empty parameter list

That section will explain it.


Here is a good tutorial on functions:
http://www.nada.kth.se/kurser/master/intro/Course04-05/Handouts/Flecture05.pdf
wulffert



Joined: 17 Sep 2003
Posts: 6
Location: New York, NY

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sat Apr 03, 2010 11:10 am     Reply with quote

I find it is better to explicitly say what it is. Usually empty brackets on most compiler will generate a warning (no parameters) the linker will just ignore and create a call as if it were void anyway.
_________________
http://wulffert.com
http://towerlightmonitor.com
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group