home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16098 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.3 KB  |  24 lines

  1. Newsgroups: comp.lang.c
  2. 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
  3. From: misar@rbg.informatik.th-darmstadt.de (walter misar)
  4. Subject: Re: Returned struct
  5. Sender: news@news.th-darmstadt.de (The News System)
  6. Message-ID: <1992Nov6.172910@rbg.informatik.th-darmstadt.de>
  7. Date: Fri, 6 Nov 1992 16:29:10 GMT
  8. References: <1992Nov5.075611.14809@piccolo.cit.cornell.edu> <Bx9pJE.Et4@portal.hq.videocart.com>
  9. Nntp-Posting-Host: rbhp58.rbg.informatik.th-darmstadt.de
  10. Organization: TU Darmstadt
  11. Lines: 11
  12.  
  13. In article <Bx9pJE.Et4@portal.hq.videocart.com>, dfuller@portal.hq.videocart.com (Dave Fuller) writes:
  14.  
  15. > As i said, you can pass structures with some compilers, but if you want 
  16. > to do this the 'right' way, pass the pointers to them instead.
  17.  
  18. The ANSI standard explicitly allows structures to be assigned by structs,
  19. passed as function arguments and to be returned by functions. Problems will
  20. omly arise, if you compile the code on one machine, and link it on another,
  21. because some compiler pass a pointer if a struct is used as argument, while
  22. other put thw whole struct on the stack.
  23.  
  24.