TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Rob Swindell
from: Bo Simonsen
date: 2003-09-13 18:11:30
subject: Pointers

Hello Rob!

10 Sep 03 14:14, you wrote to me:

 >> Indeed, but how is it in C, with integers, i've defined TRUE as 1
 >> and FALSE 0, is
 >>
 >>         if(function(parm) == TRUE)
 >>
 >> nessersary or could I use if(function(parm)) ?

 RS> There's no assignment in that expresion, so it's fine (without the ==
 RS> TRUE).

I doubt the assignment is nedded?

 RS> But if you did:

 RS>            if(i=function(parm))

 RS> Some compilers will generate a warning, so it's often better to use:

 RS>            if((i=functin(parm))==TRUE)  /* no warning */

Oh now I see..

Regards,
Bo

... Time you enjoy wasting, was not wasted. -- John Lennon
--- 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™.