My apologies, I found the answer to the access question in the language
specification. However, I couldn't find an example for creating an instance of
an inner class outside of the outside class. Is it called just as:
class outside {
...
class inside {
...
?}
}
var out_class : outside;
var in_class : outside.inside;
Or is there another form of declaration and initialization?
Thank you very much,
Jake
________________________________
From: Caswell, Jacob <[email protected]>
Sent: Sunday, August 28, 2016 10:36 AM
To: [email protected]
Subject: [EXTERNAL] Nested classes in Chapel
Hello all,
I found the following tutorial that says classes in Chapel are similar to
classes in Java. Does this mean that Chapel supports nested classes as well?
I've been reworking some of my code to use object oriented structures to help
facilitate task parallelism in a multilocale execution. The idea being that I
could create an instance of the task, which needs both fields and methods
specific to the executing locale, in a reusable way. However, I've been having
some issues with using nested classes in my code.
In Chapel, is it possible to create an instance of an inner class, either
within a method from the outer class or outside of both of the classes? And if
so, what access will the inner class have? Can it return variables from its
outer class? Is there documentation for this functionality that I missed?
Thank you very much,
Jake
------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users