TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Frank Malcolm
date: 1996-11-02 15:29:06
subject: #defines

Hi, David.

DN>  > DN> if (*MK_FP(here,there))   /* Or VAL if this is your preferred
DN>  > DN> obfuscation */ fptr = func1;
DN>  > Me?Obfuscate?Never!:-)

DN> The correct syntax is:

DN>     Me ? Obfuscate : !Ever; /* :-) */

DN> Don't worry about me - I'm a little jaded on gratuitous use of #define. Som
DN> folks want to write C in other languages (like Pascal) and tend to get
DN> #define happy, which more often than not makes the code incredibly difficul
DN> to read by anyone else but themselves. Somehow they think it more

I've seen those - define { = begin, } = end etc.

DN> asthetically pleasing, or perhaps an accomplishment in itself, but unless
DN> there is some intrinsic *technical* value in using a #define (like a
DN> manifest constant or some other common value used in many source places tha
DN> may be subject to change at some future date), then it should be avoided at
DN> all costs. IMVHO.

Totally agree, IMNSO. :-)

One other place I might use it would be if I wanted the code inline for
speed, but written separately for clarity.

Regards, fIM.

 * * No amount of planning will replace dumb luck.
@EOT:

---
* Origin: Pedants Inc. (3:711/934.24)
SEEN-BY: 633/267 270
@PATH: 711/934 808 50/99 635/728 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™.