The documentation for the *name *method of the Package class states the
following:


*Returns the string name of the package.*

*The package name may be*


   - * the absolute path of the executing program,*
   -
*any name that was specified when creating an instance of a Package or
   Routine class, *
   -
*"REXX" for classes defined by Rexx, or *
   - *"INSTORE" for code executed through the rexx -e command.*

When a Routine object is created using a relative path, e.g.

.Routine~newFile("routine.rex"),


package~name will return "routine.rex" instead of the fully qualified name
of the program.

Similarly, if one creates a routine using, for example,

.Routine~new("routine.rex","Return 1"),


then package~name will also return "routine.rex".

Is there a way to get the fully qualified filename, when it exists, and
only when it exists?

If there is not, wouldn't it be nice if we had, say, a qualifiedName
method, that returned precisely this value?

Of course I can always use the findProgram method of the Package class, but
this is pretty ugly, and anyway it is not foolproof (I can't know whether
the Routine was created from a file or by providing the source).

  Josep Maria
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to