| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Bad habits & file moving |
Hello John,
In a message dated 13 Apr 96 you wrote to Peter Collis :
JG> I use PCC and to keep the speed up, as much as practical (I use
JG> an XT to do my programming), I avoid header files.
You are truly a sick man.
JG> One thing in favour of having TRUE=0 is that on a no error
JG> completion of a function you can simply "fall through" at
the end, i.e.
JG> no explicit RETURN. I personally like using non-zero far FALSE as it
JG> allows me to test for FALSE and then act acording to what value was
JG> actually returned, much like DOS error levels.
The general idea of using zero for FALSE and non-zero for TRUE is that you
can do things like this:
is_working=TRUE;
if (is_working)
{
blah;
}
Also if a function returns either TRUE or FALSE you can have it in a
conditional the same way, eg:
if (ok_to_save())
{
save_it();
}
When you know that the variable or function is boolean it makes the code
easier to read and understand.
For instance, my first example with your definitions:
is_working=TRUE;
if (is_working==TRUE)
{
blah;
}
Isn't quite as easy to read for debugging purposes.
FidoNet 3:640/452.35
Josh Marshall RIPNet 154:474/100.35
Member TEAM AMIGA AmigaNet 41:400/452.35
... "Whenever I see a dalmation I say, `What number are you?'"- s.w.
--- Mail Manager 1.1x/p
* Origin: It's rude to Point (3:640/452.35{at}fidonet)SEEN-BY: 50/99 78/0 620/243 623/630 640/151 201 206 216 217 222 230 238 247 SEEN-BY: 640/281 305 309 370 375 452 452 531 820 821 822 823 890 895 937 SEEN-BY: 690/660 711/401 409 410 413 430 808 809 932 934 712/515 713/888 SEEN-BY: 714/906 800/1 7877/2809 @PATH: 711/934 |
|
| 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™.