| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pointers |
G'day Kurt,
Sun 2003-09-07 09:46, Kurt Kuzba (2:292/516.666) wrote to All:
BS>> KK> if(myPointer) free(myPointer);
BS>> The same as if(myPointer != NULL) i bet?
KK> Yes indeed. C is rather elegant in that respect. If the
KK> value of a variable is 0, then it is false when compared with if.
Okay, and with pointers it's NULL.
KK> If it has any other value, then it is true, and one may use the
KK> exclamation point to test for false as well as for true, depending
KK> on which test is more expedient in any given situation.
Okay, i understood so :)
Regards,
Bo
--- timEd/Linux 1.11.b1
* 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™.