This one bit me today

John Hascall hascall at atanasoff.cs.iastate.edu
Mon Oct 23 05:57:55 AEST 1989


In article <2651 at hub.UUCP> dougp at voodoo.ucsb.edu writes:
 
}#define @ *
 
}and @ptr would be translated to *ptr. This would also be nice for
 
}I'd also like to see /# comment #/ as the nested comment charactor
}(can anyone think of a way /# or #/ would look like some other 
}operation like /* can?) maby /* */ can be sent the way of =*

    If only K&R had choosen not to overload "*" and used "@" for
    pointer dereferencing (i.e., @ptr).  It even reads right: "at ptr"!

    Poor old "@" is just about the only character on the keyboard ignored
    by C!!  (` is the other)

    I have wondered about this for some time, can anyone shed some light
    on this?

    I think nested comments are more dangerous than useful.  When I still
    did some work in Pascal, I wished for them so I could comment out a block
    of code without having to manually mung all of the comments, but with C
    you've got "#ifdef" to work with.

John Hascall



More information about the Comp.lang.c mailing list