if(p)

David Herron, NPR Lover david at ukma.UUCP
Fri Sep 27 23:42:50 AEST 1985


In article <516 at talcott.UUCP> tmb at talcott.UUCP (Thomas M. Breuel) quotes:
>In article <1671 at brl-tgr.ARPA>, ART at ACC.ARPA (Art Berggreen) writes:
>> From an abstract language viewpoint, an "if" statement conditionally
>> executes a block of statements based on whether the control statement
>> evaluates to a condition of *TRUE*.  Pointers by themself do not
>> have attributes of TRUE vs FALSE.  Thus, "if(pointer)" makes less semantic

I disagree...  Pointers have VALID and INVALID values.  So when you
say if(p) you're asking if it has a VALID or INVALID value.  It's
just that conveniently most machines have 0 as the INVALID value.
-- 
--- David Herron
--- ARPA-> ukma!david at ANL-MCS.ARPA
--- UUCP-> {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!david
---        {ihnp4,decvax,ucbvax}!cbosgd!ukma!david

Hackin's in me blood.  My mother was known as Miss Hacker before she married!



More information about the Comp.lang.c mailing list