TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Bo Simonsen
date: 2003-09-14 18:26:28
subject: Pointers

Hello Jasen!

13 Sep 03 22:00, you wrote to me:

 BS>> It means all other than 2 is false? and 2 is true?

 JB> no... C treats anything other than 0 as true,  only 0 is false, (NULL
 JB> too, but that's usually 0)

NULL if it's a pointer yes.

 JB>>> if("pigs fly") puts("All non-null pointers
are true");

 JB> in case that one had you scratching your head "pigs fly" is a
 JB> constant
 JB> character array, and arrays can be treated as pointers, and are never
 JB> NULL.

Ofcause.

Regards,
Bo

... Only I can change my life. No one can do it for me. -- Carol Burnett
--- GoldED+/LNX 1.1.4.7
* Origin: The Night Express, Roennede Dk (2:236/100)
SEEN-BY: 633/267 270
@PATH: 236/100 237/9 20/11 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.