Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!ART@ACC.ARPA From: ART@ACC.ARPA (Art Berggreen) Newsgroups: net.lang.c Subject: RE: if(p) Message-ID: <1671@brl-tgr.ARPA> Date: Mon, 23-Sep-85 14:59:52 EDT Article-I.D.: brl-tgr.1671 Posted: Mon Sep 23 14:59:52 1985 Date-Received: Wed, 25-Sep-85 11:15:49 EDT Sender: news@brl-tgr.ARPA Lines: 20 I've been watching the discussion about "if(pointer)" and have not seen the following observation: [I'll probably raise flames requarding booleans under C, but please treat this as an abstract view.] 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 sense than "if(pointer == SOME_VALID_POINTER_VALUE)". What to test against has been discussed in previous messages. "Art Berggreen"Please return any flames to . ------