Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!rutgers!cbmvax!peter From: peter@cbmvax.commodore.com (Peter Cherna) Newsgroups: comp.sys.amiga.tech Subject: Re: gadgets in 2.0 Keywords: gadgets 2.0 Message-ID: <11472@cbmvax.commodore.com> Date: 9 May 90 16:29:45 GMT References: <1990May6.183020.17956@calgary.uucp> <5185@jhunix.HCF.JHU.EDU> <609@teslab.lab.OZ> Reply-To: peter@cbmvax (Peter Cherna) Organization: Commodore, West Chester, PA Lines: 41 In article <609@teslab.lab.OZ> andrew@teslab.lab.oz.au (Andrew Phillips 289 8712) writes: >In article <5185@jhunix.HCF.JHU.EDU> barrett@jhunix.UUCP (Dan Barrett) writes: >>And Pascal and Modula2 can indeed call routines that have an arbitrary >>number of arguments. Consider "writeln()", for example. > >This is incorrect. Writeln() is not a real function/procedure but is >part of the Pascal language. Pascal has nice strong typing rules. It was designed to be a good choice as a first language (not to denigrate its power at all, but rather to point out its singular strength). Sadly, when I was in school at the level where people were learning to program (not that long ago, I'm not that old :-) ), the mindset was that people should begin with BASIC before moving on to the advanced languages like Pascal or C or Fortran. The fortunate among us were able to forget the mistakes we learned in BASIC and learn to organize and structure ourselves the way Pascal required. Pascal requires that all functions have fixed strongly-typed arguments. Excellent idea, but even they had to admit that the real-world demands some tradeoffs of idealism/structure vs. efficiency, and writeln() was Pascal's sheepish concession. Conversely, C has gone too far, though ANSI has brought it back some. >There is also a problem for C in that although C allows a variable >number of parameters some compilers have a maximum limit (e.g. 20). Generally not on the Amiga. The standard C-style calling convention puts arguments on the stack, so you can pile them up until you blow your stack. >Andrew. >-- >Andrew Phillips (andrew@teslab.lab.oz.au) Phone +61 (Aust) 2 (Sydney) 289 8712 Peter -- Peter Cherna, Software Engineer, Commodore-Amiga, Inc. {uunet|rutgers}!cbmvax!peter peter@cbmvax.cbm.commodore.com My opinions do not necessarily represent the opinions of my employer. "If you insist on spending $10000 on a 68030 technology, may we humbly suggest you buy three Amiga 3000's."