The point I was trying to make was that ab.bin is a containing rexx program but apparently not.


On Thu, May 16, 2013 at 5:51 PM, Mark Miesfeld <> wrote:
On Thu, May 16, 2013 at 8:34 AM, Staffan Tylen <> wrote:
I'm a bit confused about the scope of PRIVATE versus PUBLIC classes. In the ooRexx documentation under the ::CLASS directive it says:

If you specify the PUBLIC option, the class is visible beyond its containing Rexx program to any other program that references this program with a ::REQUIRES directive. (See ::REQUIRES.) If you do not specify the PUBLIC option, the class is visible only within its containing Rexx program

So if I compile the example below like this: REXXC a.cls ab.bin

file a.cls:
::METHOD init
say 'Hello from A'
::REQUIRES b.cls

file b.cls:
::METHOD init
say 'Hello from B'

then I would consider the result ab.bin to be "a containing Rexx program", so that A can call B. Now, if I have:


You are misunderstanding here.  

Class B is private, it is not seen in any other file than b.cls.  If you require the b.cls file, that's fine.  But, any other file that requires b.cls will only see the public stuff in b.cls.  The other file will not see anything private in b.cls

file c.rex:
::REQUIRES ab.bin

That IMHO should work, but it doesn't. I can see why c.rex should not be able to call B but there is an error when A tries to call B.

It's clear that I've misunderstood the expression "containing Rexx program", maybe this could be clarified a bit.

It seems pretty clear to me.  ;-)  How would you clarify it?

Mark Miesfeld 

AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
Oorexx-users mailing list