| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Pointers |
G'day Charles,
Sun 2003-09-07 08:55, Charles Angelich (1:106/2000) wrote to Bo Simonsen:
BS>>>>> if(function(parm) == TRUE) nessersary or could I use
BS>>>>> if(function(parm)) ?
RT>>>> I think a better definition would be to #define FALSE 0
RT>>>> and TRUE !FALSE - in other words, nonzero.
BS>>>> Hmm.. How could the compiler handle that?
RT>>> The compiler? The preprocessor would take care of it...
BS>> Yes but FALSE isn't explicit defined.
CA> Not sure but I think there is some misunderstanding going on here.
Hm.. I'm not sure.
CA> Both you and Roy are including code within paragraphs of
CA> English that obscures the meaning(s).
CA> You have "if(function(parm)) ?" in your text - the
"?" happens to
CA> have a 'meaning' within the C language that I don't think you
CA> intended to refer to.
It was a question :-) Maybe i should put brackets around it.
CA> Roy has "#define FALSE 0 and TRUE !FALSE" within his text and I
CA> think Roy _meant_:
CA> #define FALSE 0
CA> #define TRUE !FALSE
So far i'm on.
CA> The "and" appears to be pseudo code as it is within the text minus
CA> another "#define" statement.
CA> Generally it is best to keep the lines of code separate in
CA> messages rather than included within a paragraph. It is too
CA> easy for the meaning of a particular line of code to be
CA> misunderstood when the end of the code line is not obvious?
Well look at that example,
my code:
#define FALSE 0
#define TRUE !FALSE
if(func(parm) == TRUE)
...
then after complication it would be:
if(func(parm) == !FALSE)
...
Or?
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™.