| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pointers |
From: kkuzba{at}centurytel.net
To: c_echo{at}yahoogroups.com
* Author: Bo Simonsen
BS> KK> if(myPointer) free(myPointer);
BS> The same as if(myPointer != NULL) i bet?
Yes indeed. C is rather elegant in that respect. If the
value of a variable is 0, then it is false when compared with if.
If it has any other value, then it is true, and one may use the
exclamation point to test for false as well as for true, depending
on which test is more expedient in any given situation.
> kkuzba{at}centurytel.net http://home.centurytel.net/kkuzba
> 'But how will that help us?' asked Sam.
--- SoupGate-Win32 v1.05
* Origin: kkuzba{at}centurytel.net (2:292/516.666)SEEN-BY: 633/267 270 @PATH: 292/516 854 140/1 106/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™.