home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!gmd.de!Germany.EU.net!rrz.uni-koeln.de!unidui!math.fu-berlin.de!news.th-darmstadt.de!rbg.informatik.th-darmstadt.de!misar
- From: misar@rbg.informatik.th-darmstadt.de (walter misar)
- Subject: Re: Returned struct
- Sender: news@news.th-darmstadt.de (The News System)
- Message-ID: <1992Nov6.172910@rbg.informatik.th-darmstadt.de>
- Date: Fri, 6 Nov 1992 16:29:10 GMT
- References: <1992Nov5.075611.14809@piccolo.cit.cornell.edu> <Bx9pJE.Et4@portal.hq.videocart.com>
- Nntp-Posting-Host: rbhp58.rbg.informatik.th-darmstadt.de
- Organization: TU Darmstadt
- Lines: 11
-
- In article <Bx9pJE.Et4@portal.hq.videocart.com>, dfuller@portal.hq.videocart.com (Dave Fuller) writes:
-
- > As i said, you can pass structures with some compilers, but if you want
- > to do this the 'right' way, pass the pointers to them instead.
-
- The ANSI standard explicitly allows structures to be assigned by structs,
- passed as function arguments and to be returned by functions. Problems will
- omly arise, if you compile the code on one machine, and link it on another,
- because some compiler pass a pointer if a struct is used as argument, while
- other put thw whole struct on the stack.
-
-