HELP!! arg-lists in Turbo-C

David M. Read readdm at walt.cc.utexas.edu
Wed Oct 18 08:31:49 AEST 1989


I am trying to write a variable-length arg-list processor in
Turbo-C, and for special reasons I can't use the stuff supplied
in <stdarg.h>.  Everything works fine, except when I try to
pass floats.  I noticed that when I use va_arg (va_list, type) with 
type = float, the result is useless, but using type = double seems
to resolve the problem.  This indicates that floats are pushed onto
the stack as type double, no?

The trick is this: I need to BUILD a va_list, not analyze one.  Can anyone     
tell me if my guess is correct, and perhaps how to build a va_list if it's 
not?

Thanks in advance.


----------------------------------------------------------------------------
David M. Read                        best -=>  readdm at walt.cc.utexas.edu
                           all-else-fails -=>  read at physics.utexas.edu

"...[he's] stupid and he's ignorant but he's got guts...and guts is enough!"
----------------------------------------------------------------------------



More information about the Comp.lang.c mailing list