1. Re: When will Eu be updated again and more
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 10, 2001
- 405 views
- Last edited Feb 11, 2001
Derek Parnell writes: > Robert, > what will happen in this sort of case... > > mycommon.e: > global constant True = (1 = 1), > False = (1 = 0) > > FILE_A.E: > include mycommon.e > if ... = True then ... > > FILE_B.E: > include mycommon.e > if ... = True then ... > > MainProg.ex: > global constant True = "TRUE", > False = "False" > > include FILE_A.E > include FILE_B.E > ================== > In this sort of scenerio, which "True" constant is > seen by FILE_A.E code? Euphoria ignores an include of an already-included file, so the second "include mycommon.e", i.e. the one in FILE_B.E will be ignored. The global constant True declared in MainProg.ex will currently conflict with the one in mycommon.e and you'll get an error. I think what I'll do with the namespace enhancement is *not* issue an error when this conflict is detected, instead I'll wait until you actually try to use True, then I'll require you to say which True you are referring to. You'll have to qualify it with the file name, e.g. MainProg.True or mycommon.True although I guess if it's declared in the same file, it will default to that True, rather than one in another file. So in MainProg.ex, True will mean the one in MainProg.ex, unless you say mycommon.True. By the way, there's no difference between constant True = 1 and constant True = (1 = 1) Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com