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

Re: Pointers
  By: Bo Simonsen to Jasen Betts on Fri Sep 05 2003 03:22 pm

 > 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)) ?

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

But if you did:

           if(i=function(parm))

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

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

                                                  digital man

Snapple "Real Fact" #145:
Lake Superior is the world's largest lake. 
--- SBBSecho 2.00-Win32
* Origin: Vertrauen - vert.synchro.net (1:103/705)
SEEN-BY: 633/267 270
@PATH: 103/705 218/903 10/3 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™.