Scope Problem

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

You define a global type/procedure/function/constant/variable in the
main file, then include file(s) that define the same global. Then you
include a file that uses it, what namespace can you put for the main
file? globa:globular is globa.e, globb:globular is globb.e but nothing
for the main file?
Dan

<test.exw>
global type globular(atom a)
=09return a=0
end type

include globa.e as globa
include globb.e as globb

include test2.e
</test.exw>
<globa.e>
global type globular(atom a)
=09return a=1
end type
</globa.e>
<globb.e>
global type globular(atom a)
=09return a=10
end type
</globb.e>
<test.e>
globular test
</test.e>

.\test2.e:1
A namespace qualifier is needed to resolve globular.
globular is defined as a global symbol in:
    test.exw
    .\globa.e
    .\globb.e

globular test
       ^

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

Search



Quick Links

User menu

Not signed in.

Misc Menu