Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ceres.physics.uiowa.edu!iowasp.physics.uiowa.edu!ns-mx!uunet!elroy.jpl.nasa.gov!usc!apple!stadler Newsgroups: comp.sys.apple2 Subject: Re: ML subroutines (passing parameters in ML) Message-ID: <52093@apple.Apple.COM> From: stadler@Apple.COM (Andy Stadler) Date: 27 Apr 91 03:44:17 GMT References: <51983@apple.Apple.COM> <13084@pasteur.Berkeley.EDU> Organization: Apple Computer Inc., Cupertino, CA Lines: 22 In article <13084@pasteur.Berkeley.EDU> fadden@cory.Berkeley.EDU writes: > >No C program I have ever written (which includes NuLib and the usual >academic projects like a compiler, an object rendering system, etc) has >passed arguments larger than four bytes. > >Strings are NOT passed as a string, but as a pointer to the string. Many >versions of C don't allow entire structures to be passed (APW C is an >exception), but instead only allow pointers to them to be passed. 1. No C program -you- have ever written moved structures - the only thing that implies is that you understand how compilers work! There are a lot of people out there who don't; Many of them read this newsgroup and just because you know enough to design parameter calls efficiently doesn't mean that everybody else does. 2. Consider your exception - it happens to be the #1 C compiler used on the GS. I would consider that to be the norm. Large structures on the stack is a sad truth which we must consider on the GS. Andy Stadler Apple Computer, Inc.