From: Anand Hariharan on
On Tue, 08 Apr 2008 09:15:35 +0100, Francis Glassborow wrote:

> Anand Hariharan wrote:
>> On Tue, 08 Apr 2008 00:20:31 +0000, Hal Vaughan wrote:
>> (...)
>>> Does it work that way in C and C++? I didn't expect it to, but that
>>> code example implies that you can do:
>>>
>>> if (p)...
>>>
>>> and if p is defined it evaluates as true and if p isn't defined, it
>>> evaluates as false.
>>>
>>
>> The word 'definition' has a very precise meaning in C and C++. If
>> 'p' were not to be defined, the code would not compile.
>
> Yes 'definition' has a very precise meaning but not quite what you
> think. For the code to compile it only needs to have been declared
> (names are declared, the entities they name are defined)
>

Okay. How about this:

If 'p' were not to be defined, the code would not link.

--
ROT-13 email address to reply