Function declarations (was: MSC v5.1 Bug???)
der Mouse
mouse at mcgill-vision.UUCP
Sun Sep 11 20:50:12 AEST 1988
In article <13344 at mimsy.UUCP>, chris at mimsy.UUCP (Chris Torek) writes:
> In article <1275 at mcgill-vision.UUCP> mouse at 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 at larry.mcrcim.mcgill.edu
More information about the Comp.lang.c
mailing list