I want to have a "c-style" function that refers
to a "global" variable. The following
code fragment fails with the msg "Undefined class 'o'" if I have a "o.println()" line
in foo(). If I use System.out then it's ok.
Is there some way for a function like this to
refer to global vars?
o = System.out;
void foo()
{
o.println( "doesn't work"); // dj error
System.out.println( "ok"); // works fine
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to have a "c-style" function that refers
to a "global" variable. The following
code fragment fails with the msg "Undefined class 'o'" if I have a "o.println()" line
in foo(). If I use System.out then it's ok.
Is there some way for a function like this to
refer to global vars?
o = System.out;
void foo()
{
o.println( "doesn't work"); // dj error
System.out.println( "ok"); // works fine
}