[phix] How does namespacing work?

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

Test one

namespace m 
include builtins/map.e 
 
map x = new() 
put( x, "one",  1000 ) 
? get(x, "one" ) 
 
/* 

? get(x, "one" ) 
  ^ a namespace qualifier is required 
get is defined in: 
    /usr/local/bin/builtins/map.e, 
    /usr/local/bin/builtins/get.e. 
*/ 

Test two

namespace m 
include builtins/map.e 
 
map x = new() 
put( x, "one",  1000 ) 
? m:get(x, "one" ) 
 
/* 

? m:get(x, "one" ) 
    ^ undefined identifier get 
*/ 

_tom

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

Search



Quick Links

User menu

Not signed in.

Misc Menu