Statement terminators
Peter da Silva
peter at ficc.uu.net
Tue May 9 23:36:10 AEST 1989
In article <1843 at ubu.warwick.UUCP>, geoff at cs.warwick.ac.uk (Geoff Rimmer) writes:
> In article <2296 at mit-caf.MIT.EDU> vlcek at mit-caf.MIT.EDU (Jim Vlcek) writes:
> > In fact, I myself would lean the other direction and prefer that
> > macros not follow the strict ``to the next newline'' rule, but rather
> > have a more explicit means of terminating the definition body.
Me too...
> I agree that it can be *very* annoying having to backquote all the
> newlines in macros (take a look at "putc" in stdio.h !) But how else
> could cpp be designed so it knows when to stop?
A new construct for multiline macros?
#begin Malloc(x)
({char *tempptr=malloc(x);
if (!tempptr) perror_("malloc failed");tempptr;})
#end
> (BTW this is only when I'm using gcc - so no flames!)
I think it's kind of cute, but then I get nostalgic over BCPL.
--
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.
More information about the Comp.lang.c
mailing list