RE: Revised Namespace Proposal

new topic     » goto parent     » topic index » view thread      » older message » newer message

Robert Craig wrote:
> I read through the suggestions that people put forward
> last week regarding the namespace issue, ...
> If anyone can see a simple way to improve ...
> please post it to this list. ...
>    Rob Craig

-- Hello Rob,

-- A new keyword "with_global" may give a simple way to define 
-- a unique global symbol MYSYMBOL 
-- even when the symbol MYSYMBOL is already defined as global 
-- by 2 (or more) included files e.g. MYFILE1.E and MYFILE2.E

-- if

include MYFILE1.E
include MYFILE2.E with_global MYSYMBOL

-- then MYSYMBOL is the global MYSYMBOL defined into MYFILE2.E

-- elseif

include MYFILE1.E with_global MYSYMBOL
include MYFILE2.E 

-- then MYSYMBOL is the global MYSYMBOL defined into MYFILE1.E

-- elseif

include MYFILE1.E with_global MYSYMBOL
include MYFILE2.E with_global MYSYMBOL

-- then it is an error

-- elseif

include MYFILE1.E 
include MYFILE2.E 

-- then the interpreter gives an warning    
-- and/or (may be) an error when MYSYMBOL will be used somewhere

-- it should be possible to code:

include SOMEFILE.E with_global MYSYMBOL1, MYSYMBOL2, MYSYMBOL3   ...

-- If the symbol MYSYMBOL is not defined into MYFILE.E then

include MYFILE.E with_global MYSYMBOL

-- is an error

-- Here are some synonyms for the new keyword "with_global":

   "with global"            -- if there is no parse problem...
   "including_global"
   "including global"       -- if there is no parse problem...
   "including"

In hopes of helping... Sincerly
        (a french speaking old programmer from Belgium)
Gilbert Lemaitre

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu