Talk About Network

Google





Programming > C - C++ Learning > Re: [C and C++]...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 12 Topic 4095 of 4400
Post > Topic >>

Re: [C and C++] && Operator precedence

by Anand Hariharan <znvygb.nanaq.unevunena@[EMAIL PROTECTED] > Apr 8, 2008 at 04:00 PM

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
 




 12 Posts in Topic:
[C and C++] && Operator precedence
Aggro <spammerdream@[E  2008-04-07 20:24:45 
Re: [C and C++] && Operator precedence
Ulrich Eckhardt <dooms  2008-04-07 22:34:34 
Re: [C and C++] && Operator precedence
Hal Vaughan <hal@[EMAI  2008-04-08 00:20:31 
Re: [C and C++] && Operator precedence
Jack Klein <jackklein@  2008-04-07 21:48:22 
Re: [C and C++] && Operator precedence
Philip Potter <pgp@[EM  2008-04-08 08:55:35 
Re: && Operator precedence
=?ISO-8859-1?Q?Andr=E9_Ca  2008-04-08 04:06:10 
Re: && Operator precedence
Philip Potter <pgp@[EM  2008-04-08 13:21:46 
Re: [C and C++] && Operator precedence
Philip Potter <pgp@[EM  2008-04-07 23:12:16 
Re: [C and C++] && Operator precedence
Francis Glassborow <fr  2008-04-07 23:42:49 
Re: [C and C++] && Operator precedence
Anand Hariharan <znvyg  2008-04-08 04:48:45 
Re: [C and C++] && Operator precedence
Francis Glassborow <fr  2008-04-08 09:15:35 
Re: [C and C++] && Operator precedence
Anand Hariharan <znvyg  2008-04-08 16:00:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 12:55:57 PST 2009.