Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!cullvax!drw From: drw@cullvax.UUCP (Dale Worley) Newsgroups: comp.lang.c Subject: VMS 'C' prototypes Message-ID: <1501@cullvax.UUCP> Date: Thu, 27-Aug-87 11:17:22 EDT Article-I.D.: cullvax.1501 Posted: Thu Aug 27 11:17:22 1987 Date-Received: Sat, 29-Aug-87 09:42:13 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 38 jdc@naucse.UUCP (John Campbell) writes: > Should old and new style definitions yield different behaviors? Well, if your function prototype doesn't agree with the definition (whether the definition is old style or new), the code is definitely erroneous. The code you presented: 2 void screwy (int aa, char **bb); 11 void screwy (a, b) 12 int a; 13 float b; { ... } should be flagged with an error. If the compiler doesn't, it's deficient. > Are prototypes all that useful in such an implementation? Definitely, yes. It's the only way you can have the compiler check function calls in one source file with function definitions in another source file. > Is it really correct to CVTFL in the guise of "assignment compatibility"? Well, it's correct according to ANSI C. But what else could the programmer mean? If the argument *has* to be 'float', and user has written '1', what could possibly be meant? > (DEC, the inventors of runoff, use TeX!) Not quite! runoff existed on CTSS (the world's first timesharing system). Dale -- Dale Worley Cullinet Software ARPA: cullvax!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw Apollo was the doorway to the stars - next time we should open it. Disclaimer: Don't sue me, sue my company - they have more money.