This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Functions in gcc


Dear Sir

Is it possible to use a function in a C program and compile it using the
gcc compiler? If yes then how can I do that? The idea is that I want to
define a new function and use it in a main program. Can I use the
following function:

mpf_t   xyz (  mpf_t a, mpf_t b )
{
   mpf_t c;   mpf_init ( c );
   mpf_set ( c, a, b );
   return c;
}

Then in the main program do I write

   mpf_set ( w, xyz( u, v ) );

How to initialize the arguments of a function?

Is there a function for calculating the exponential value (that is e to
the power of x)?


Thanks and regards

Abdullah Hussein
ahussein@sharjah.ac.ae





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]