Re: ver 4.0 Name Space Question ?

new topic     » goto parent     » topic index » view thread      » older message » newer message
bernie said...
-- LIBA.e -- 
public constant 
foo1 = 1, 
foo2 = 2 
 
public function foobarr1() 
return 0 
end function 
 
public function foobarr2() 
return 0 
end function 
 

and this ...

-- LIBB.e -- 
-- No I want to pass on just the constants not 
-- the public functions from LIBA.e. 
   

Ok. Code like this then ...

-- LIBA.e -- 
public constant 
foo1 = 1, 
foo2 = 2 
 
export function foobarr1() 
return 0 
end function 
 
export function foobarr2() 
return 0 
end function 
 

and this ...

-- LIBB.e -- 
-- I want to pass on just the constants not 
-- the functions from LIBA.e.   
public include LIBA.e 

The export scope modifier is used for this purpose. It works just like public except that these symbols are only ever passed up one level only. In other words, if a file wants to use an export symbol, that file must include it explicitly.

You still do a public include to expose the public symbols but any exported symbols are not seen by files that include LIBB.e

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

Search



Quick Links

User menu

Not signed in.

Misc Menu