TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Frank Adam
date: 1996-10-23 20:50:00
subject: #defines

Hi guys,

Is there any way a code can be executed in a #if statement or outside a 
function ? 

I'm trying to refer to a memory location, and define two similar functions 
according to the value in there.
I know a couple of other ways to do it, but i was trying to go..

#define VAL *MK_FP(here,there) 

#if(VAL)         
 #define func() func1() 
#else 
 #define func() func2()
#endif

It looked good, but maybe i just can't compile until the compiler gets a 
chance to compile ? :-) 
                          
  L8r Frank(fadam{at}ozemail.com.au)
                       
___ Blue Wave/DOS v2.21

---
* Origin: Melbourne PC User Group BBS (3:632/309)
SEEN-BY: 3/103 50/99 620/243 623/630 632/50 107 108 309 348 360 371 504 525
SEEN-BY: 632/530 533 562 633/371 634/388 396 635/301 502 503 544 728 639/252
SEEN-BY: 711/409 410 413 430 808 809 932 934 712/515 713/317 714/906 800/1
@PATH: 632/309 107 635/503 50/99 711/808 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™.