TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: `Dalton Spence`
date: 2003-02-03 06:39:16
subject: [TSEPro] [SAL] Defines across Include files

From: "Dalton Spence" 
@Date: Sun, 2 Feb 2003 15:09:17 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au



I was trying to recompile my custom UI shell using conditional defines, and
the following problem appeared:

 ---- in my "Custom.ui" file ----

#define USE_AS_STANDALONE_MACRO FALSE
#include ["..\mac\MyMenu.s"] // My personal utility menus and procedures.
                             // Contains key redefinitions so *must* by
                             // placed *before* the base .ui is included.

 ---- in my "MyMenu.s" file ----

#ifndef USE_AS_STANDALONE_MACRO
#define USE_AS_STANDALONE_MACRO TRUE
#endif

    . . . . .

#if USE_AS_STANDALONE_MACRO
proc main()
    MyMenu()
end
#endif

 ----

When the compiler reached the "#if" statement above I got a "Symbol
undefined" error for USE_AS_STANDALONE_MACRO. How is this possible? Even if
the symbol's scope is only the current source file, my #ifndef block should
have given it a default value. In the immortal words of Vinnie Barbarino,
"I'M SO CONFUSED!!!"

--
              {at}=================================================={at}
              | Dalton S. Spence, B.Sc.  |
              | Home Page: http://www.hwcn.org/~ag775/home.html  |
              |      Family Motto: Virtute Acquiritur Honos      |
              | Oral Roberts dreamed that Mr. Science titillates |
              |       Tristero and my 23rd helmet. FNORD!        |
              {at}=================================================={at}


--
TSEPro mailing list



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/1 379/1 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™.