function call in c 
Author Message
 function call in c

Hi,

pls explain these in relation to the way C call a function/procedure.
as i undertand C push parameters in reverse order, so if i have a
function sum(int a, int b), so when sum() is called the parameters will
be pushed onto stack like this:
   push a
   push b

right? i got that far...

ok if i have a structure like this:
  struct {
     int a;
     int b;
  } astruct;

and a function afunc(astruct x), so if a call is made to afunc(), how
are the parameters pushed?

and also if i have another function anofunc(astruct* x), and a call is
made, how are the param/params pushed?

how many bytes do these take up when pushed onto stack:

Quote:
> int*
> char*
> astruct*
> astruct
> fptr    ( where fptr is void(*fptr)() )
> sometype  ( where sometype is enum sometype {one, two, three}

thank you...
annex.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 05 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VC++ calling fortran function and fortran function calling a c++ function

2. C functions calling {C++/Ada/...} functions

3. What function called this function ??

4. Function called from the Listener or from another function

5. Can the 'call library function call code other than c

6. Cross reference/Call structure tools for C function calls

7. returning values through functions calls

8. Looking for utility for displaying function call structure of a workspace

9. Message sends and function calls--terminology

10. Primitive failed in Platform function call

11. function call at runtime ?

12. Help with C function call translation please

 

 
Powered by phpBB® Forum Software