variable argument lenth mpz init
enders game
endersgame99@yahoo.com
Fri, 27 Dec 2002 13:31:16 -0800 (PST)
--- Kevin Ryde <user42@zip.com.au> wrote:
> enders game <endersgame99@yahoo.com> writes:
> >
> > mpz_init_va(3, &a, &b, &c);
>
> You probably don't need the "&" there.
>
> An alternative to passing a count like 3 might be to
> look for a NULL
> to mark the end of the list. Could be easier when
> adding or removing
> things.
Yes, looking for a NULL pointer is a good idea. I'm
pretty sure I have to pass addresses though. I tried
passing the actual mpz_t variables, and printing the
memory addresses, but I got copied mpz_ts and not
pointers.
A better idea than looking for a null is to use a
format string like printf has with conversion
characters for the various GMP types, but I dont need
that for my purposes.
~Andrew
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com