what is a header block of the fuction

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2008
Posts: 5
Reputation: rookanga is an unknown quantity at this point 
Solved Threads: 0
rookanga rookanga is offline Offline
Newbie Poster

what is a header block of the fuction

 
0
  #1
25 Days Ago
my assignment says to "Finish the header block on the function.
" What is the header block? Is it the // (write information) or is it something else?
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 44
Reputation: Fbody is an unknown quantity at this point 
Solved Threads: 5
Fbody Fbody is offline Offline
Light Poster
 
0
  #2
25 Days Ago
Originally Posted by rookanga View Post
my assignment says to "Finish the header block on the function.
" What is the header block? Is it the // (write information) or is it something else?
It's the very first line of the function. Some also consider the non-required pre:/post: statements to be part of it as well.

i.e.:
  1. int myFunction (double arg1, bool arg2 [, more args]) //<-- the function header
  2. {
  3. //pre: precondition1
  4. // precondition2
  5.  
  6. //post: result1
  7. // result2
  8.  
  9.  
  10. //...action statements...
  11. }

Note, if you are going to use a prototype / declaration statement, it must match the header.
Last edited by Fbody; 25 Days Ago at 3:55 pm.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC