rogue@andromeda.rutgers.edu.rutgers.edu (Rogue Project) (08/05/89)
If anyone has used varargs with C++ on a system that does not support vsprintf and vprintf, etc. Could you please e-mail me and tell me how the !$@#$^%* you did it!!! Thank You, Peter Farabaugh ..rutgers!andromeda!pete ..rutgers!andromeda!rogue
dspoon@ncratl.Atlanta.NCR.COM (Dave Witherspoon) (08/07/89)
In article <Aug.5.12.57.12.1989.7712@galaxy.rutgers.edu>, rogue@andromeda.rutgers.edu.rutgers.edu (Rogue Project) writes: > > If anyone has used varargs with C++ on a system that does not > support vsprintf and vprintf, etc. Could you please e-mail me and tell me > how the !$@#$^%* you did it!!! > I currently have a rather complex variable argument list working under Zortech's C++ compiler (1.07). The thing to remember is that chars and shorts are promoted to ints, and floats are promoted to doubles. Of course, they never come right out and say that! What I've found is that you can only pull ints, doubles, and pointers off a variable arg list. Pulling references off the list can also be done (what's that about there being a thin line between bravery and stupidity...) but with some effort. Hope this helps! -------------------------------David Witherspoon------------------------------- D.Witherspoon@Atlanta.NCR.COM | "Dolphins find humans amusing, but NCR Retail Systems Development/Atlanta| they don't want to talk to them." MY OPINIONS...ALL MINE!!! | - David Byrne
dog@cbnewsl.ATT.COM (edward.n.schiebel) (08/08/89)
From article <872@ncratl.Atlanta.NCR.COM>, by dspoon@ncratl.Atlanta.NCR.COM (Dave Witherspoon): > [stuff deleted]... What I've found is that > you can only pull ints, doubles, and pointers off a variable arg > list. Pulling references off the list can also be done (what's that > about there being a thin line between bravery and stupidity...) but with > some effort. I have not been successful at getting references from a variable arg list (honestly, I haven't had the time to give it a real good try). Any pointers :-) would be helpful Ed Schiebel AT&T Bell Labs vilya!dog@att.com