Article View: comp.sys.amiga.tech
Article #9582Re: Variable Argument Lists in Lattice 4.1
From: David Geary
Date: Mon, 22 Aug 1988 22:31
Date: Mon, 22 Aug 1988 22:31
20 lines
1272 bytes
1272 bytes
In article <296@nfsun.UUCP>, kgeisel@nfsun.UUCP (kurt geisel) writes: > > Is there any way to get Lattice C 4.1 to provide variable argument list > support using the standard varargs.h/stdarg.h macros? > Oops, forgot to mention one thing. Remember, that when C puts short and char values on the stack, they are automatically converted to int. Floats are automatically converted to double. Therefore, if you want to pass a float, say, to a variadic function, you must extract it off the stack as a double, and then cast it into a float. Ditto for char's and short's (meaning extract off stack as int's, and then cast). -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ David Geary, Boeing Aerospace, ~ ~ Seattle - "THE DRIZZLE CAPITAL OF THE WORLD" ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID:
<2177@ssc-vax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!uw-beaver!ssc-vax!dmgReferences:
<296@nfsun.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!uw-beaver!ssc-vax!dmg From: dmg@ssc-vax.UUCP (David Geary) Newsgroups: comp.sys.amiga.tech Subject: Re: Variable Argument Lists in Lattice 4.1 Keywords: variable argument lattice C 4.1 Message-ID: <2177@ssc-vax.UUCP> Date: 22 Aug 88 22:31:59 GMT References: <296@nfsun.UUCP> Organization: Boeing Aerospace Corp., Seattle WA Lines: 19