Re: variable scope
- Posted by _tom (admin) Feb 18, 2021
- 828 views
katsmeow said...
Given:
-- == Application Name == object var1 include IncludeName.e
Run with C:\OE4.1.0-x64\bin\eui.exe
Crashes in IncludeName.e because var1 is undeclared.
I have tried export , public , and global , only global works, but i don't want to blast that all over the rest of the program. Apparently, export and public work in only one direction; that is: if i declared var1 in IncludeName.e as public or export, then ApplicationName could see var1.
What am i missing?
Kat
each include works in one direction only
if you want var1 to be visible in IncludeName.e the you must
- write global object var1
- IncludeName.e must ''include'' the file containing var1
be well
_tom