Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!brolga!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: comp.lang.modula2 Subject: Re: Why no ** operator in Modula2? Message-ID: <2178@uqcspe.cs.uq.oz.au> Date: 27 Jun 91 04:58:11 GMT References: <3253.28683DC3@puddle.fidonet.org> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 45 On a message of 18-Jun-91, Scott McMahan (1:105/42.0) Said: > To close: Which is better? > > WriteString("Amount: "); > WriteInt(NumberOfThings[1]); > Write("."); > WriteLn(); > -or- > printf("Amount: %d.\n"); > From a programmer's point of view? In addition to Jon Guthrie's comments, WriteFormattedInt("Amount: %d.\n", NumberOfThings[1]); Is perfectly legit Modula-2, providing someone has written the module for it. It is just that so many C hackers have been bumbling around for so long that such procedures exist in C. If you REALLY WANT variable arg counts in M2, write a parameter-passing module. I think you'd be crazy to use such an abomination of structure. Warwick. DEFINITION MODULE VarArgs; FROM SYSTEM IMPORT BYTE; PROCEDURE Push(VAR Arg:ARRAY OF BYTE); PROCEDURE Pop(VAR Arg:ARRAY OF BYTE); END VarArgs. beleuch! Looks like C. -- _-_|\ warwick@cs.uq.oz.au / * <-- Computer Science Department, \_.-._/ University of Queensland, v Brisbane, AUSTRALIA.