6f3 Subj : Re: Win98 error To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Sat Mar 13 2004 03:36 am Thomas Maeder [TeamB] wrote: >Bob Gonder writes: Thing is, it isn't an int, it's a scalar. And if you say it's an int, doesn't the compiler treat it as an int, with all the demotion/promotion/signedness problems of ints? I kinda like the macro's capability to be any type/size long L; int i; short s; DWORD d; if( anyoftheabove < macrovalue ) doesn't complain about comparing signed and unsigned values. Also doesn't need to promote, say s to an int. At least, thats what I would assume that "const int c" would mean compare int c to short s >The main problem is that you can very easily break code at one end of a >program by #defining a macro at the other end because macros don't respect >scopes. Yeah, I don't do that. All my Macros are file in scope (clearly outside of all functions). And I try to keep my files in the 1-600 line range which cuts down on potential conflicts. Haven't been bit by a hidden macro yet. And the compiler complains if a macro is redefined accidentally. >I agree that *this* is a problem. One of the leading principles in the design >of the C language was to keep the number of keywords low; C++ follows this >principle as well. The result is that all but one of the meanings of keywords >such as static and virtual are confusing at least. Yeah, I searched for several weeks or maybe months for a "private" keyword so my local routines wouldn't clash with same-named locals in other modules.... Static... who'da thunk it? (I also tried to find the "public" equivalent as ASM is Private unless declaired Public, so logicaly, C should be too.) . 0