Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Snit <usenet@gallopinginsanity.com> |
|---|---|
| Newsgroups | comp.lang.c, comp.os.linux.advocacy |
| Subject | Re: #define with semicolon |
| Date | 2011-07-19 16:57 -0700 |
| Message-ID | <CA4B6805.9F735%usenet@gallopinginsanity.com> (permalink) |
| References | (1 earlier) <70288d39-b915-4810-af5f-827299aaaa0b@e8g2000yqi.googlegroups.com> <ln8vrzpl6d.fsf@nuthaus.mib.org> <CA45CC20.9F032%usenet@gallopinginsanity.com> <4e25c739$1@news.x-privat.org> <j055e8$etf$1@dont-email.me> |
Cross-posted to 2 groups.
J. J. Farrell stated in post j055e8$etf$1@dont-email.me on 7/19/11 4:53 PM:
> cc wrote:
>> Snit wrote:
>>> Keith Thompson stated in post ln8vrzpl6d.fsf@nuthaus.mib.org on
>>> 7/15/11 9:23 AM:
>>>
>>>> cc <scatnubbs@hotmail.com> writes:
>>>>> On Jul 13, 2:19 pm, cc <scatnu...@hotmail.com> wrote:
>>>>>> Is it acceptable practice to have a #define with a semicolon in it,
>>>>>> such as:
>>>>>>
>>>>>> #define SMALL 1;
>>>>>>
>>>>>> I didn't think it was, but a very good friend of mine claims it's
>>>>>> perfectly acceptable if you want to prevent the #define from being
>>>>>> used in an expression like if(SMALL).
>>>>> It seems as though some people have taken issue with my
>>>>> characterization of the situation. First off, it wasn't a very good
>>>>> friend, but actually someone I don't even know. It was a Usenet
>>>>> thing. That was supposed to be a joke for others reading, but one
>>>>> person was very upset and called me a liar. So no, it wasn't "a
>>>>> very good friend." Also, they seem to have an issue with the way I
>>>>> presented the situation. Here is the full post:
>>>>>
>>>>> "'The semi-colon will be expanded as part of the macro, causing the
>>>>> printf to fail to compile.'
>>>>>
>>>>> Correct - but in reality what I actually do is exploit that to make
>>>>> it intentionally fail!
>>>>>
>>>>> e.g. I could easily write
>>>>>
>>>>>
>>>>> if(SMALL) { do something } else { do something else }
>>>> [snip]
>>>>
>>>> I don't recall anyone *here* taking issue with your characterization,
>>>> much less calling you a liar. If someone did so elsewhere, I fail
>>>> to see why you should bring it here, or why anyone here should care.
>>> He insisted people would want to know about his mischaracterization
>>> of his relationship with 7. I told him you folks likely would not -
>>> and, at first, he wanted *me* to tell you about his
>>> misrepresentation. I told him the whole idea was silly.
>>>
>>> This really comes from a fairly long set of debates where cc has been
>>> busted making all sorts of claims about me and others. He fabricates
>>> quotes when he knows he has lost a Usenet debate. Some examples:
>>>
>>> -----
>>> "I have taken HCI classes on Making GUIs Pretty." - Snit
>>> -----
>>> "I am a mind reader." - Snit
>>> -----
>>> "I admit I have never taken any HCI classes." - Snit
>>> -----
>>> "There are no general principles in HCI." - John M. Carroll
>>> -----
>>> "I don't know the difference between opinion and fact." - Snit
>>> -----
>>
>> Poor Snit. You make up things about people all the time and then cry when
>> people do it to you.
>>
>>> But, whatever.
>>>
>>>> But ok, by your own description you misstated your relationship with
>>>> the person who made the suggestion. You describe that misstatement
>>>> as a
>>>> joke, but you made it in a context where nobody would have any
>>>> reason to think it wasn't serious. I certainly had no reason to
>>>> doubt that the
>>>> person in question is "a very good friend" of yours (and very little
>>>> reason to care).
>>> Exactly. He lied to you - but about something that does not really
>>> matter. It is weird... why tell the lie at all? But then, once he
>>> did, why make an issue out of it?
>>>
>>>> With regard to the technical issue, I'd say that
>>>>
>>>> #define SMALL 1;
>>>>
>>>> is almost certainly a very bad idea. There might be a valid reason
>>>> to reject the use of SMALL in some contexts, but that's not the way
>>>> to do it. As has been pointed out several times, code that refers to
>>>> SMALL assuming it's defined in a more conventional way could either
>>>> quietly work as intended, or quietly give incorrect results, or fail
>>>> with a syntax error (and a message that's likely to be misleading).
>>>>
>>>> It would help to know exactly what contexts SMALL is *intended*
>>>> to be used in, and what contexts are to be discouraged.
>>>>
>>>> I do not mean this to be a criticism of the person who made the
>>>> suggestion, since we don't know the context, and I don't particularly
>>>> trust your characterization of it.
>>> Makes sense.
>>>
>>>> Apparently the person in question posts as "Snit", and has recently
>>>> posted in this thread. If Snit would care to discuss the technical
>>>> issues, I'd be interested.
>>> I am not the one who even posted the technical question... and am not
>>> a programmer (do some scripting, but not a programmer).
>>>
>>>> Perhaps there are good reasons for the macro that I haven't thought
>>>> of -- or perhaps the macro definition isn't as you've presented it.
>>>> But if it's going to devolve into an argument about who lied about
>>>> whom in some other forum, perhaps you could keep it in that other
>>>> forum rather than spreading it here.
>>> Good thought.
>
> Would you two ask your nannies to push your prams of somewhere else, please.
To be fair, this is not likely cc. Based on headers it is probably a guy
named Steve Carroll who follows me around wherever I go. He, like cc, loves
to forge people's identities.
In any case, sorry the COLA madness slipped over to CLC. I just did not
want cc to spread lies about me here that went unanswered. As if anyone in
CLC cares about me one whit. :)
--
[INSERT .SIG HERE]
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
#define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-13 11:19 -0700
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-13 12:38 -0700
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-13 12:56 -0700
Re: #define with semicolon Dr Nick <3-nospam@temporary-address.org.uk> - 2011-07-13 21:09 +0100
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-13 13:30 -0700
Re: #define with semicolon Hallvard B Furuseth <h.b.furuseth@usit.uio.no> - 2011-07-14 13:03 +0200
Re: #define with semicolon Gene <gene.ressler@gmail.com> - 2011-07-14 05:27 -0700
Re: #define with semicolon Roberto Waltman <usenet@rwaltman.com> - 2011-07-15 10:54 -0400
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-15 09:05 -0700
Re: #define with semicolon Robert Wessel <robertwessel2@yahoo.com> - 2011-07-15 11:49 -0500
Re: #define with semicolon Noob <root@127.0.0.1> - 2011-07-21 15:31 +0200
Re: #define with semicolon "J. J. Farrell" <jjf@bcs.org.uk> - 2011-07-22 01:51 +0100
Re: #define with semicolon Harald van Dijk <truedfx@gmail.com> - 2011-07-13 13:51 -0700
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-13 14:01 -0700
Re: #define with semicolon Harald van Dijk <truedfx@gmail.com> - 2011-07-13 14:14 -0700
Re: #define with semicolon Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-07-13 17:10 -0600
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-13 16:20 -0700
Re: #define with semicolon Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-14 14:03 +0300
Re: #define with semicolon Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-14 01:22 +0100
Re: #define with semicolon Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-22 15:50 +0300
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-22 21:46 +0000
Re: #define with semicolon Ian Collins <ian-news@hotmail.com> - 2011-07-23 09:54 +1200
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-22 22:21 +0000
Re: #define with semicolon Seebs <usenet-nospam@seebs.net> - 2011-07-23 00:12 +0000
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-23 00:37 +0000
Re: #define with semicolon Willem <willem@toad.stack.nl> - 2011-07-23 09:55 +0000
Re: #define with semicolon Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-07-22 15:54 -0600
Re: #define with semicolon Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-23 01:14 +0300
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-22 22:28 +0000
Re: #define with semicolon Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-07-23 02:52 +0300
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-23 00:14 +0000
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-22 16:52 -0700
Re: #define with semicolon Todd Carnes <toddcarnes@gmail.com> - 2011-07-23 00:07 +0000
Re: #define with semicolon Ben Pfaff <blp@cs.stanford.edu> - 2011-07-13 13:04 -0700
Re: #define with semicolon Barry Schwarz <schwarzb@dqel.com> - 2011-07-13 17:11 -0700
Re: #define with semicolon Walter Banks <walter@bytecraft.com> - 2011-07-14 08:11 -0400
Re: #define with semicolon pete <pfiland@mindspring.com> - 2011-07-14 08:24 -0400
Re: #define with semicolon "io_x" <a@b.c.invalid> - 2011-07-14 17:34 +0200
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-15 04:12 -0700
Re: #define with semicolon Anders Wegge Keller <wegge@wegge.dk> - 2011-07-15 14:49 +0200
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-15 08:37 -0700
Re: #define with semicolon "cc" <scatnubs@hotmail.com> - 2011-07-19 11:03 -0700
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-15 09:23 -0700
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-15 10:37 -0700
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-15 13:07 -0700
Re: #define with semicolon Keith Thompson <kst-u@mib.org> - 2011-07-15 13:26 -0700
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-15 13:31 -0700
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-19 08:55 -0700
Re: #define with semicolon "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-07-19 14:12 -0700
Re: #define with semicolon "cc" <scatnubs@hotmail.com> - 2011-07-19 11:05 -0700
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-19 11:18 -0700
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-19 11:23 -0700
Re: #define with semicolon cc <scatnubbs@hotmail.com> - 2011-07-19 11:31 -0700
Re: #define with semicolon "cc" <scatnubs@hotmail.com> - 2011-07-19 11:05 -0700
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-15 10:51 -0700
Re: #define with semicolon "cc" <scatnubs@hotmail.com> - 2011-07-19 11:04 -0700
Re: #define with semicolon "J. J. Farrell" <jjf@bcs.org.uk> - 2011-07-20 00:53 +0100
Re: #define with semicolon Snit <usenet@gallopinginsanity.com> - 2011-07-19 16:57 -0700
Re: #define with semicolon gordonb.ethca@burditt.org (Gordon Burditt) - 2011-07-15 10:33 -0500
Re: #define with semicolon Michael Angelo Ravera <maravera@prodigy.net> - 2011-07-22 10:55 -0700
csiph-web