Xref: utzoo comp.lang.c:12492 comp.sys.ibm.pc:18992 Path: utzoo!attcan!uunet!husc6!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Function declarations (was: MSC v5.1 Bug???) Message-ID: <1309@mcgill-vision.UUCP> Date: 11 Sep 88 10:50:12 GMT References: <10102@genrad.UUCP> <11879@iuvax.cs.indiana.edu> <5680@rpp386.UUCP> <13344@mimsy.UUCP> Organization: McGill University, Montreal Lines: 31 In article <13344@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > In article <1275@mcgill-vision.UUCP> mouse@mcgill-vision.UUCP (der Mouse) writes: >> I *would* be surprised to find that [this doesn't work] >> foo() { ... { double glurf(char*,int); ... } } >> static double glurf(char *s,int maxlen) { ... } > Surprise! You have such a lovely way of phrasing things, Chris... :-) > Putting these together, the *only* legal ways to write this are: > static double glurf(char *, int); > foo() { ... /* call glurf */ ... } > static double glurf(char *s, int maxlen) { ... } > or > static double glurf(char *s, int maxlen) { ... } > foo() { ... /* call glurf */ ... } Since the whole idea was to document the fact that foo calls glurf, near the point of call (ie, in foo), how about: static double glurf(char *, int); foo() { double glurf(char *, int); ... /* call glurf */ ... } static double glurf(char *s, int maxlen) { ... } Is this permitted? der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu