Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Converting from Classic Rexx to ooRexx

254 views
Skip to first unread message

Jennifer Murphy

unread,
Aug 9, 2012, 3:20:34 AM8/9/12
to
I downloaded the install file for ooRexx. Before I launch into it, are
there any good tutorials for and of the following:

* Installation guide
* Finding an editor
* Getting started tutorial

I couldn't find any of these on the SourceForge website.

I do have the documentation PDFs (Language Ref, Prog Guide, etc.).

Rony

unread,
Aug 9, 2012, 3:33:09 AM8/9/12
to
Maybe a few hints:

- ooRexx is a Rexx interpreter: you can just keep on writing Rexx programs and execute them with
ooRexx in 32 and 64 bits on all operating systems it got ported to

- you can start to intermix Rexx code with the new features that come along with ooRexx, like
becoming able to fetch stems as stems without a need for exposing it, if you use USE ARG instead of
PARSE ARG

- you may want to look into the 10 page intro to ooRexx at:
<http://wi.wu.ac.at/rgf/rexx/misc/ecoop06/ECOOP2006%5fRDL%5fWorkshop%5fFlatscher%5fPaper%2epdf>

- you may want to read/skim through the first 100 pages of the programming guide which gets
installed with ooRexx (rexxpg.pdf), which is a tutorial like intro to ooRexx

- you can ask questions here (there are quite a few knowledgeable, nice people!)


Also, all the ooRexx documentation is available in PDF or HTML form from <http://www.oorexx.org/docs/>

HTH,

---rony


Jennifer Murphy

unread,
Aug 9, 2012, 10:25:08 AM8/9/12
to
On Thu, 09 Aug 2012 09:33:09 +0200, Rony <rony.fl...@wu-wien.ac.at>
wrote:

>On 09.08.2012 09:20, Jennifer Murphy wrote:
>> I downloaded the install file for ooRexx. Before I launch into it, are
>> there any good tutorials for and of the following:
>>
>> * Installation guide
>> * Finding an editor
>> * Getting started tutorial
>>
>> I couldn't find any of these on the SourceForge website.
>>
>> I do have the documentation PDFs (Language Ref, Prog Guide, etc.).
>
>
>Maybe a few hints:
>
>- ooRexx is a Rexx interpreter: you can just keep on writing Rexx programs and execute them with
>ooRexx in 32 and 64 bits on all operating systems it got ported to
>
>- you can start to intermix Rexx code with the new features that come along with ooRexx, like
>becoming able to fetch stems as stems without a need for exposing it, if you use USE ARG instead of
>PARSE ARG
>
>- you may want to look into the 10 page intro to ooRexx at:
><http://wi.wu.ac.at/rgf/rexx/misc/ecoop06/ECOOP2006%5fRDL%5fWorkshop%5fFlatscher%5fPaper%2epdf>

Thanks, that will be helpful. I see that you wrote that. Nice work.

>- you may want to read/skim through the first 100 pages of the programming guide which gets
>installed with ooRexx (rexxpg.pdf), which is a tutorial like intro to ooRexx
>
>- you can ask questions here (there are quite a few knowledgeable, nice people!)

Is this the only user forum for ooRexx? Is there no web-based user forum
specifically for ooRexx like there is for most software products?

>Also, all the ooRexx documentation is available in PDF or HTML form from <http://www.oorexx.org/docs/>

Yes, I found that page and downloaded all of the docs. But I didn't see
any installation guide (for Windows). I suppose I just run the install
file (ooRexx-4.1.1-windows.x86_32.exe), but it would be very helpful to
have some documentation about,

* Where to put the executables (for the ooRexx interpreter).

* Where to put the execs I write.

* A little about filetypes (ooRexx v Classic Rexx).

* How to find and use the editor. I read somewhere that it is separate
from the interpreter.

* How to set up and use a function library and how to move mt Classic
Rexx functions over to use with ooRexx. I see a chapter in the Prog
Guide about external libraries, but that appears to be for compiled
functions (DLLs).


I have often wondered why Rexx is not more widely used. Compared to VB
and VBA, which are an inholy mess, Rexx has to be an order of magnitude
more productive. It seems like it could compete very well with other
languages like R and Perl.

Rick McGuire

unread,
Aug 9, 2012, 10:51:50 AM8/9/12
to
There are forums and mailing lists at the ooRexx sourceforge site
(https://sourceforge.net/projects/oorexx/). We'd prefer you use the
user mailing list over the forum, but either will get you assistance.

>
>> Also, all the ooRexx documentation is available in PDF or HTML form from <http://www.oorexx.org/docs/>
>
> Yes, I found that page and downloaded all of the docs. But I didn't see
> any installation guide (for Windows). I suppose I just run the install
> file (ooRexx-4.1.1-windows.x86_32.exe), but it would be very helpful to
> have some documentation about,

Just run the executable and follow the instructions.

>
> * Where to put the executables (for the ooRexx interpreter).

Generally, just take the installer default.

>
> * Where to put the execs I write.

Anywhere you want, though we recommend not putting them in the
interpreter install directories.

>
> * A little about filetypes (ooRexx v Classic Rexx).

You can use any filetypes you want, although people typically use .rex

>
> * How to find and use the editor. I read somewhere that it is separate
> from the interpreter.

There is no "official" ooRexx editor. You can use any editor you want.

>
> * How to set up and use a function library and how to move mt Classic
> Rexx functions over to use with ooRexx. I see a chapter in the Prog
> Guide about external libraries, but that appears to be for compiled
> functions (DLLs).

What sort of function libraries are you talking about? If just
programs, then place them in any directory on the path and they will be
located.

Shmuel Metz

unread,
Aug 9, 2012, 8:51:43 AM8/9/12
to
In <tqm628p1dq8unbg05...@4ax.com>, on 08/09/2012
at 12:20 AM, Jennifer Murphy <JenM...@jm.invalid> said:

>Subject: Converting from Classic Rexx to ooRexx

It's mostly compatible, although there are some documented
incompatibilities. Do you have any Rexx-callable routines written in
other languages?

>* Finding an editor

What's wrong with the editor that you were using for classic Rexx?

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spam...@library.lspace.org

Jennifer Murphy

unread,
Aug 9, 2012, 12:37:10 PM8/9/12
to
On Thu, 09 Aug 2012 10:51:50 -0400, Rick McGuire <objec...@gmail.com>
wrote:
OK, thanks. I have a collection of Rexx functions that I have built up
over the years. I don't have have any functions from other languages
other than rxxmath.

Jennifer Murphy

unread,
Aug 9, 2012, 12:46:57 PM8/9/12
to
On Thu, 09 Aug 2012 08:51:43 -0400, Shmuel (Seymour J.) Metz
<spam...@library.lspace.org.invalid> wrote:

>In <tqm628p1dq8unbg05...@4ax.com>, on 08/09/2012
> at 12:20 AM, Jennifer Murphy <JenM...@jm.invalid> said:
>
>>Subject: Converting from Classic Rexx to ooRexx
>
>It's mostly compatible, although there are some documented
>incompatibilities. Do you have any Rexx-callable routines written in
>other languages?

Just rxxmath.

>>* Finding an editor
>
>What's wrong with the editor that you were using for classic Rexx?

Nothing. I didn't know if ooRexx came with an editor or had one that was
recommended.

I'm using UltraEdit (http://www.ultraedit.com/). It works pretty well.
It has pretty good general-purpose syntax highlighting including the
option to define a profile (Wordfile) for any language. They already had
one for Rexx

http://www.ultraedit.com/files/wf/rexx.uew

I didn't like how it worked, so I wrote my own, which I uploaded to
their download site.

http://www.ultraedit.com/files/wf/rexxquercus.uew

I'll continue to use it.

Glenn Knickerbocker

unread,
Aug 9, 2012, 1:00:06 PM8/9/12
to
On 8/9/2012 3:33 AM, Rony wrote:
> - you can start to intermix Rexx code with the new features that come along with ooRexx, like
> becoming able to fetch stems as stems without a need for exposing it, if you use USE ARG instead of
> PARSE ARG

Related to this is the one substantial incompatibility: When a stem is
assigned to another stem, in Object Rexx the entire stem object is
assigned rather than just the default value. To make your code
compatible, you need to put the value being assigned into an expression
that will cause it to be evaluated as a string. The simplest way is to
concatenate it with the null string:

x. = y.'' /* x. = y. would assign the stem object in Object Rexx */
z. = f(x)'' /* f(x) *might* return a stem object in Object Rexx */

The one other incompatibility you might run into, depending on what Rexx
version you've been using, is the line comment syntax. ooRexx takes
"--" and anything following it as a comment. If you build expressions
for INTERPRET and need to allow for subtracting negative numbers, you'll
have to be sure to pad your minus signs with blanks:

Say 2 - - 2 /* says 4 */
Say 2--2 /* says 2 in ooRexx */

ŹR

Rony

unread,
Aug 9, 2012, 1:54:32 PM8/9/12
to
Glenn:

On 09.08.2012 19:00, Glenn Knickerbocker wrote:
> On 8/9/2012 3:33 AM, Rony wrote:
>> - you can start to intermix Rexx code with the new features that come along with ooRexx, like
>> becoming able to fetch stems as stems without a need for exposing it, if you use USE ARG instead of
>> PARSE ARG
>
> Related to this is the one substantial incompatibility: When a stem is
> assigned to another stem, in Object Rexx the entire stem object is
> assigned rather than just the default value. To make your code
> compatible, you need to put the value being assigned into an expression
> that will cause it to be evaluated as a string. The simplest way is to
> concatenate it with the null string:
>
> x. = y.'' /* x. = y. would assign the stem object in Object Rexx */
> z. = f(x)'' /* f(x) *might* return a stem object in Object Rexx */

Just out of curiosity, when would one do an assignment of one stem to another in classic Rexx? Have
you ever done that, and if so, why (what was the reason)?

NB: I learned Rexx about thirty years ago on a VM/CMS and have never used nor encountered such a
statement.


Ad assigning a default value to a stem works like it used to:

x.="n/a"
say x.1 /* says "n/a" */



> The one other incompatibility you might run into, depending on what Rexx
> version you've been using, is the line comment syntax. ooRexx takes
> "--" and anything following it as a comment. If you build expressions
> for INTERPRET and need to allow for subtracting negative numbers, you'll
> have to be sure to pad your minus signs with blanks:
>
> Say 2 - - 2 /* says 4 */
> Say 2--2 /* says 2 in ooRexx */

Same question out of curiosity: who has ever created such a clause in a Rexx program, honestly? (And
if anyone ever did, what was the reason doing 2--2 or 2- -2 instead of 2+2 ?)


---rony



Jennifer Murphy

unread,
Aug 9, 2012, 3:11:01 PM8/9/12
to
On Thu, 09 Aug 2012 13:00:06 -0400, Glenn Knickerbocker
<No...@bestweb.net> wrote:

>On 8/9/2012 3:33 AM, Rony wrote:
>> - you can start to intermix Rexx code with the new features that come along with ooRexx, like
>> becoming able to fetch stems as stems without a need for exposing it, if you use USE ARG instead of
>> PARSE ARG
>
>Related to this is the one substantial incompatibility: When a stem is
>assigned to another stem, in Object Rexx the entire stem object is
>assigned rather than just the default value. To make your code
>compatible, you need to put the value being assigned into an expression
>that will cause it to be evaluated as a string. The simplest way is to
>concatenate it with the null string:
>
> x. = y.'' /* x. = y. would assign the stem object in Object Rexx */
> z. = f(x)'' /* f(x) *might* return a stem object in Object Rexx */

I don't think I have ever used an expression like that, so I'm probably
good on that one.

>The one other incompatibility you might run into, depending on what Rexx
>version you've been using, is the line comment syntax. ooRexx takes
>"--" and anything following it as a comment. If you build expressions
>for INTERPRET and need to allow for subtracting negative numbers, you'll
>have to be sure to pad your minus signs with blanks:
>
> Say 2 - - 2 /* says 4 */
> Say 2--2 /* says 2 in ooRexx */

Why does ooRexx use "--" as the comment delimiter?

It looks like it's not a multi-line comment like /* ... */, right? More
like the single quote in VB?

Glenn Knickerbocker

unread,
Aug 9, 2012, 5:01:38 PM8/9/12
to
On 8/9/2012 1:54 PM, Rony wrote:
> Just out of curiosity, when would one do an assignment of one stem to
> another in classic Rexx?

I didn't find any examples in my own code, but I'm sure I've done it
before. Here's a reasonable scenario: At the start of your exec, you
have logic that produces a default value for one stem. Later on, you
need a second, empty stem with the same default value, to be populated
from a different source.

>> Say 2--2 /* says 2 in ooRexx */
> Same question out of curiosity: who has ever created such a clause
> in a Rexx program, honestly?

I haven't, but that's partly because my coding style would almost always
use concatenation with blanks to build the expression (and of course
mostly because I avoid INTERPRET in the first place). I've had to
maintain other people's execs that used INTERPRET, and I wouldn't be at
all surprised by something like this:

expression=expression'-'offset /* where OFFSET might be '-2' */
Interpret variable'='expression

�R

Glenn Knickerbocker

unread,
Aug 9, 2012, 5:08:04 PM8/9/12
to
On 8/9/2012 3:11 PM, Jennifer Murphy wrote:
> <No...@bestweb.net> wrote:
>> x. = y.'' /* x. = y. would assign the stem object in Object Rexx */
>> z. = f(x)'' /* f(x) *might* return a stem object in Object Rexx */
> I don't think I have ever used an expression like that, so I'm probably
> good on that one.

I think you may have got me backwards. Those are the forms you *should*
use in order to write compatible code. If you write:

z. = f(x)

then, in ooRexx, if F returns a stem object, you'll be assigning the
whole object to Z., not just its default value. To avoid that accident,
you need to put F(X) into an expression where it will be evaluated as a
string:

z. = f(x)''

�R

Swifty

unread,
Aug 10, 2012, 9:41:39 AM8/10/12
to
On Thu, 09 Aug 2012 09:37:10 -0700, Jennifer Murphy
<JenM...@jm.invalid> wrote:

>I have a collection of Rexx functions that I have built up
>over the years.

Then you'll find the ::Requires directive in oorexx extremely
interesting.

In classic REXX, if you want to share your functions across all of the
programs you use, then you would store each one in its own file, and
REXX will execute it as necessary, as an external function. With each
function in its own file, if you find a bug, then you fix the one
file, and all of your programs benefit.

However, there is a downside to this. If you call a classic REXX
external function from a loop, it is horribly inefficient, because
each call to the external routine is like starting up a new program.
The startup penalty can be severe.

With ::Requires, you put all of your functions into one file (I called
mine subroutines.rex). Then any program needing your functions just
has a:

::Requires subroutines.rex

The functions inside subroutines.rex are processed as part of the
startup of your program, and from then onwards, calls to your function
are very much faster.

You still get the benefit that your functions are all held in one file
- fix that, and all your programs benefit. The maintenance effort is
much reduced.

What is more, you can squeeze a little extra performance by
"compiling" your routine library with REXXC. So, I call my source
subroutines.src and it is pre-compiled into subroutines.rex

This process was the main reason that I migrated from Classic REXX to
OORexx.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Swifty

unread,
Aug 10, 2012, 9:53:07 AM8/10/12
to
On Thu, 09 Aug 2012 12:11:01 -0700, Jennifer Murphy
<JenM...@jm.invalid> wrote:

>Why does ooRexx use "--" as the comment delimiter?

I don't know about historical reasons, but it makes life MUCH easier
if you want to comment out a line of code:

A = A + 1 /* Increment A */

You have to be careful to get the "*/" in the right place (although
oorexx seems to handled nested comments better). Putting "--" at the
beginning of the line is much easier.

So much easier, in fact, that my chosen editor can comment out an
entire block of code with a couple of mouse clicks and an Alt+b+c
(block comment).

Also, "--" is a lot simpler to type than "/**/" but to a degree this
may depend on your keyboard layout. For me, the "-" is a lower-case
keystroke, so two simple presses, whereas /**/ requires changing the
shift twice.

"--" is also two characters less than "/**/" so if you comment your
code as copiously as I do, it will save you some disk space (and also
start execution a little faster if you save a whole disc block, or
more)

Swifty

unread,
Aug 10, 2012, 9:59:27 AM8/10/12
to
On Thu, 09 Aug 2012 09:46:57 -0700, Jennifer Murphy
<JenM...@jm.invalid> wrote:

>I didn't like how it worked, so I wrote my own, which I uploaded to
>their download site.

The editor that I use, EditPadPro has a syntax colouring scheme based
entirely on a list of regular expressions. I found a REXX scheme, and
extended it to cover the parts of oorexx that I use.

There was one problem that I never cracked, and that is the problem of
comment delimiters inside quoted strings. You need a mechanism that
scans through the code for the next occurrence of " ' /* or --
Regular expressions are not very good for this.

Shmuel Metz

unread,
Aug 10, 2012, 10:48:05 AM8/10/12
to
In <4qp7281alo4k9d4qt...@4ax.com>, on 08/09/2012
at 09:46 AM, Jennifer Murphy <JenM...@jm.invalid> said:

>On Thu, 09 Aug 2012 08:51:43 -0400, Shmuel (Seymour J.) Metz
><spam...@library.lspace.org.invalid> wrote:

>>It's mostly compatible, although there are some documented
>>incompatibilities. Do you have any Rexx-callable routines written in
>>other languages?
>Just rxxmath.

The new 64-bit OOREXX interface is different from the 32-bit
interface; you probably need to download a new version of rxxmath if
it's not included.

Shmuel Metz

unread,
Aug 10, 2012, 10:40:40 AM8/10/12
to
In <5pg72810h34pgo2n4...@4ax.com>, on 08/09/2012
at 07:25 AM, Jennifer Murphy <JenM...@jm.invalid> said:

>* How to find and use the editor.

Why do you need a special editor?

>I have often wondered why Rexx is not more widely used. Compared
>to VB and VBA, which are an inholy mess,

A FPOS being pushed by an 800 lb gorilla has traction.

>Rexx has to be an order of magnitude more productive.

That wouldn't surprise me.

>It seems like it could compete very well with other languages like
>R and Perl.

Rexx needs an equivalent to CPAN and robust regex[1] support.

[1] Note that Perl regexen do more than just regular expressions.

Jennifer Murphy

unread,
Aug 11, 2012, 2:31:05 AM8/11/12
to
On Fri, 10 Aug 2012 14:41:39 +0100, Swifty <steve....@gmail.com>
wrote:
That sounds good. Thanks.

Jennifer Murphy

unread,
Aug 11, 2012, 2:35:39 AM8/11/12
to
On Fri, 10 Aug 2012 14:53:07 +0100, Swifty <steve....@gmail.com>
wrote:

>On Thu, 09 Aug 2012 12:11:01 -0700, Jennifer Murphy
><JenM...@jm.invalid> wrote:
>
>>Why does ooRexx use "--" as the comment delimiter?
>
>I don't know about historical reasons, but it makes life MUCH easier
>if you want to comment out a line of code:
>
>A = A + 1 /* Increment A */
>
>You have to be careful to get the "*/" in the right place (although
>oorexx seems to handled nested comments better). Putting "--" at the
>beginning of the line is much easier.
>
>So much easier, in fact, that my chosen editor can comment out an
>entire block of code with a couple of mouse clicks and an Alt+b+c
>(block comment).

And what editor is that?

>Also, "--" is a lot simpler to type than "/**/" but to a degree this
>may depend on your keyboard layout. For me, the "-" is a lower-case
>keystroke, so two simple presses, whereas /**/ requires changing the
>shift twice.
>
>"--" is also two characters less than "/**/" so if you comment your
>code as copiously as I do, it will save you some disk space (and also
>start execution a little faster if you save a whole disc block, or
>more)

Now you've gone 'round the bend... ;-)

LesK

unread,
Aug 11, 2012, 2:52:55 AM8/11/12
to
Note that *every* source file that _needs_ to take advantage of this
technique has to be modified to add the ::Requires statement. There is
no way to do it globally.

It's not clear to me that if program A has a ::Requires for function F
and then calls program B which does NOT have a ::Requires but uses
function F, whether the in-storage copy of F will be used or it has to
be read from disk as is normally done.

Of course if you're storage limited, perhaps running on something like
the Raspberry Pi, that has to be considered.

--

Les (Change Arabic to Roman to email me)

LesK

unread,
Aug 11, 2012, 3:12:23 AM8/11/12
to
What OS and Rexx interpreter are you migrating from? The folks
knowledgeable of those specific migration considerations can help you
the most.

Jennifer Murphy

unread,
Aug 11, 2012, 3:33:33 AM8/11/12
to
I'm migrating from Personal Rexx (Quercus). I am using Win XP Pro at the
moment.

LesK

unread,
Aug 11, 2012, 4:17:44 AM8/11/12
to
Since Personal Rexx is modeled on the original CMS Rexx, you have to
consider some other possible ooRexx incompatibilities:

1. You can't use #, $, @ and cent-sign in variable names
2. Multi-line strings are not allowed.
3. These functions are not there: EXTERNAL(), FIND(), INDEX(),
JUSTIFY(), and LINESIZE(). They are in the CMS version and _may_ be in
the Quercus version.

There are nuances of stream i/o allowed/used that may not be implemented
identically in ooRexx.

Jennifer Murphy

unread,
Aug 11, 2012, 10:57:47 AM8/11/12
to
On Sat, 11 Aug 2012 04:17:44 -0400, LesK <5mr...@tampabay.rr.com> wrote:

>On 8/11/2012 3:33 AM, Jennifer Murphy wrote:
>> On Sat, 11 Aug 2012 03:12:23 -0400, LesK <5mr...@tampabay.rr.com> wrote:
>>
>>> On 8/9/2012 3:20 AM, Jennifer Murphy wrote:
>>>> I downloaded the install file for ooRexx. Before I launch into it, are
>>>> there any good tutorials for and of the following:
>>>>
>>>> * Installation guide
>>>> * Finding an editor
>>>> * Getting started tutorial
>>>>
>>>> I couldn't find any of these on the SourceForge website.
>>>>
>>>> I do have the documentation PDFs (Language Ref, Prog Guide, etc.).
>>>>
>>> What OS and Rexx interpreter are you migrating from? The folks
>>> knowledgeable of those specific migration considerations can help you
>>> the most.
>>
>> I'm migrating from Personal Rexx (Quercus). I am using Win XP Pro at the
>> moment.
>>
>Since Personal Rexx is modeled on the original CMS Rexx, you have to
>consider some other possible ooRexx incompatibilities:
>
>1. You can't use #, $, @ and cent-sign in variable names

Oh, that's too bad. I use "#" all the time.

>2. Multi-line strings are not allowed.

Maybe a few hits there.

>3. These functions are not there: EXTERNAL(), FIND(), INDEX(),
>JUSTIFY(), and LINESIZE(). They are in the CMS version and _may_ be in
>the Quercus version.

I'm sure I've used find() and probably index().

>There are nuances of stream i/o allowed/used that may not be implemented
>identically in ooRexx.

Thanks for these tips.



Are these (and any other) incompatibilities all documented somewhere?

The Brief Summary (http://www.oorexx.org/about.html) says that it is
"fully compatible", which is clearly not true.

In the ooRexx section of the Rexxinfo.org tutorials page,
(http://rexxinfo.org/html/rexxinfo1.html), Rick McGuire's "Dipping a
Toe" presentation appears to be there twice, but the second one gets an
error:

* Rexx Objects, Part Deux (this works)
* Rexx Objects: Dipping a Toe into the Object Pool (gets an error)

...and where is Part Un?

Glenn Knickerbocker

unread,
Aug 11, 2012, 11:03:46 AM8/11/12
to
On Sat, 11 Aug 2012 02:52:55 -0400, LesK wrote:
>> On Fri, 10 Aug 2012 14:41:39 +0100, Swifty <steve....@gmail.com>
>> wrote:
>>> ::Requires subroutines.rex
>>>
>>> The functions inside subroutines.rex are processed as part of the
>>> startup of your program, and from then onwards, calls to your function
>>> are very much faster.

Just to prevent confusion: By "functions" here Steve means "public
routines." Each one starts with a ROUTINE directive:

::Routine myfunction Public

where the PUBLIC keyword says it should be available to other programs.

>It's not clear to me that if program A has a ::Requires for function F
>and then calls program B which does NOT have a ::Requires but uses
>function F, whether the in-storage copy of F will be used or it has to
>be read from disk as is normally done.

It will be read from disk. Routines from one program are only exposed to
programs that have explicitly required that program.

REQUIRES is transitive, though: If program A has ::REQUIRES B, and
program B has ::REQUIRES C, then all the public routines from program C
are exposed to both B and A.

ŹR http://users.bestweb.net/~notr/cats "Would you like to watch a movie
about George Wendt while eating Chinese food with a cat?" --Andy Simmons

LesK

unread,
Aug 11, 2012, 1:27:42 PM8/11/12
to
On 8/11/2012 10:57 AM, Jennifer Murphy wrote:
> On Sat, 11 Aug 2012 04:17:44 -0400, LesK <5mr...@tampabay.rr.com> wrote:
>
>> On 8/11/2012 3:33 AM, Jennifer Murphy wrote:
>>> On Sat, 11 Aug 2012 03:12:23 -0400, LesK <5mr...@tampabay.rr.com> wrote:
>>>
>>>> On 8/9/2012 3:20 AM, Jennifer Murphy wrote:
>>>>> I downloaded the install file for ooRexx. Before I launch into it, are
>>>>> there any good tutorials for and of the following:
>>>>>
>>>>> * Installation guide
>>>>> * Finding an editor
>>>>> * Getting started tutorial
>>>>>
>>>>> I couldn't find any of these on the SourceForge website.
>>>>>
>>>>> I do have the documentation PDFs (Language Ref, Prog Guide, etc.).
>>>>>
>>>> What OS and Rexx interpreter are you migrating from? The folks
>>>> knowledgeable of those specific migration considerations can help you
>>>> the most.
>>>
>>> I'm migrating from Personal Rexx (Quercus). I am using Win XP Pro at the
>>> moment.
>>>
>> Since Personal Rexx is modeled on the original CMS Rexx, you have to
>> consider some other possible ooRexx incompatibilities:
>>
>> 1. You can't use #, $, @ and cent-sign in variable names
>
> Oh, that's too bad. I use "#" all the time.
>
You'll have to change your code to fix that.

>> 2. Multi-line strings are not allowed.
>
> Maybe a few hits there.
>
>> 3. These functions are not there: EXTERNAL(), FIND(), INDEX(),
>> JUSTIFY(), and LINESIZE(). They are in the CMS version and _may_ be in
>> the Quercus version.
>
> I'm sure I've used find() and probably index().
>
You could write external functions for those to use with ooRexx.

>> There are nuances of stream i/o allowed/used that may not be implemented
>> identically in ooRexx.
>
> Thanks for these tips.
>
>
>
> Are these (and any other) incompatibilities all documented somewhere?
>
No, but I have a chart of them for private use. Email me directly if
you'd like a copy.

> The Brief Summary (http://www.oorexx.org/about.html) says that it is
> "fully compatible", which is clearly not true.
>
> In the ooRexx section of the Rexxinfo.org tutorials page,
> (http://rexxinfo.org/html/rexxinfo1.html), Rick McGuire's "Dipping a
> Toe" presentation appears to be there twice, but the second one gets an
> error:
>
> * Rexx Objects, Part Deux (this works)
> * Rexx Objects: Dipping a Toe into the Object Pool (gets an error)
>
> ....and where is Part Un?

Jennifer Murphy

unread,
Aug 11, 2012, 1:41:14 PM8/11/12
to
OK, but why not post it for everyone to use? Maybe add it to the list of
docs on http://rexxinfo.org/html/rexxinfo1.html.

Arthur T.

unread,
Aug 11, 2012, 2:26:04 PM8/11/12
to
In Message-ID:<5023b25f$18$fuzhry+tra$mr2...@news.patriot.net>,
Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:

>>Subject: Converting from Classic Rexx to ooRexx
>
>It's mostly compatible, although there are some documented
>incompatibilities. Do you have any Rexx-callable routines written in
>other languages?

I'm a current Regina REXX user, and I also wondered about going
to ooRexx. What happens in my programs that do rxfuncadd for packages
like RexxUtil, etc.? I believe that some of those functions are now
built in, but what will happen when those rxfuncadd (and sysloadfuncs)
statements are hit?

--
Arthur T. - ar23hur "at" intergate "dot" com

Sahananda

unread,
Aug 11, 2012, 3:22:00 PM8/11/12
to
I can't tell you the technical reason why this is ok, but I know it doesn't cause a problem. Rexxutil used to not be loaded by default in ooRexx, and I still have a few scripts where I explicitly load it and they work.

hth

Jon

Gerard_Schildberger

unread,
Aug 11, 2012, 3:53:09 PM8/11/12
to
Yes, all those ARE in Personnal REXX (and also PC/REXX).

I found that I liked and depended upon LINESIZE (and SCRSIZE) so
much, I wrote a version in REXX so that if invoked by (say), Regina
REXX, it would return the appropriate results.

The LINESIZE bif, by the way, is also in R4 and ROO (ROO!).

JUSTIFY wasn't present in KEXX, so I wrote a version in REXX as well.
__________________________________________________ Gerard Schildberger

Jeremy Nicoll - news posts

unread,
Aug 11, 2012, 4:42:18 PM8/11/12
to
Glenn Knickerbocker <No...@bestweb.net> wrote:

>On Sat, 11 Aug 2012 02:52:55 -0400, LesK wrote:

> > It's not clear to me that if program A has a ::Requires for function F
> > and then calls program B which does NOT have a ::Requires but uses
> > function F, whether the in-storage copy of F will be used or it has to
> > be read from disk as is normally done.
>
> It will be read from disk. Routines from one program are only exposed to
> programs that have explicitly required that program.

Does this depend on how program A 'calls' program B? Eg if B is invoked as
a function does F still get loaded from disk?

--
Jeremy C B Nicoll - my opinions are my own.

Email sent to my from-address will be deleted. Instead, please reply
to newsre...@wingsandbeaks.org.uk replacing "aaa" by "284".

Glenn Knickerbocker

unread,
Aug 11, 2012, 8:09:36 PM8/11/12
to
On Sat, 11 Aug 2012 21:42:18 +0100, Jeremy Nicoll - news posts wrote:
>Glenn Knickerbocker <No...@bestweb.net> wrote:
>> It will be read from disk. Routines from one program are only exposed to
>> programs that have explicitly required that program.
>Does this depend on how program A 'calls' program B?

Nope. Regardless of how program B is called, it doesn't see the routines
loaded by program A's ::REQUIRES directive unless it has a ::REQUIRES for
the same program.

If A and B do both have ::REQUIRES C, then the behavior does depend on
how B is called. If it's called as an external command, then it runs in
a separate Rexx environment, so a second copy of C is loaded and C's main
routine is run again. If it's called as a function or subroutine or by a
::REQUIRES directive, it reuses the copy of C that's already loaded.

ŹR "I love Blip just because it's the absolute opposite of fun"
http://users.bestweb.net/~notr/travelog/19990710.html --Kibo

LesK

unread,
Aug 12, 2012, 2:17:44 AM8/12/12
to
On 8/11/2012 8:09 PM, Glenn Knickerbocker wrote:
> On Sat, 11 Aug 2012 21:42:18 +0100, Jeremy Nicoll - news posts wrote:
>> Glenn Knickerbocker <No...@bestweb.net> wrote:
>>> It will be read from disk. Routines from one program are only exposed to
>>> programs that have explicitly required that program.
>> Does this depend on how program A 'calls' program B?
>
> Nope. Regardless of how program B is called, it doesn't see the routines
> loaded by program A's ::REQUIRES directive unless it has a ::REQUIRES for
> the same program.
>
> If A and B do both have ::REQUIRES C, then the behavior does depend on
> how B is called. If it's called as an external command, then it runs in
> a separate Rexx environment, so a second copy of C is loaded and C's main
> routine is run again. If it's called as a function or subroutine or by a
> ::REQUIRES directive, it reuses the copy of C that's already loaded.
>
> �R "I love Blip just because it's the absolute opposite of fun"
> http://users.bestweb.net/~notr/travelog/19990710.html --Kibo
>
Is there any technical reason why we couldn't have the equivalent of
EXECLOAD and not have to do ::Requires?

Shmuel Metz

unread,
Aug 11, 2012, 10:14:45 PM8/11/12
to
In <k054eo$sbt$1...@speranza.aioe.org>, on 08/11/2012
at 04:17 AM, LesK <5mr...@tampabay.rr.com> said:

>Since Personal Rexx is modeled on the original CMS Rexx, you have
>to consider some other possible ooRexx incompatibilities:

OOREXX does not support the EXECIO command; I don't recall whether
that was in Personal REXX.

Shmuel Metz

unread,
Aug 11, 2012, 10:22:04 PM8/11/12
to
In <43pc289vjomb0q1it...@4ax.com>, on 08/11/2012
at 07:57 AM, Jennifer Murphy <JenM...@jm.invalid> said:

>I'm sure I've used find() and probably index().

OOREXX has, e.g., POS, CHANGESTR, as replacements for those.

Shmuel Metz

unread,
Aug 12, 2012, 2:49:24 AM8/12/12
to
In <5o8d28pn533q0prch...@4ax.com>, on 08/11/2012
at 02:26 PM, Arthur T. <art...@munged.invalid> said:

>I'm a current Regina REXX user, and I also wondered about going to
>ooRexx. What happens in my programs that do rxfuncadd for packages
>like RexxUtil, etc.? I believe that some of those functions are now
>built in, but what will happen when those rxfuncadd (and
>sysloadfuncs) statements are hit?

If you have a function package for an incompatible API then you'll
have to change it and recompile. I don't know whether the Regina API
is compatible with the 32-bit OOREXX API, but there is a change going
from 32-bit to 64-bit.

Sahananda

unread,
Aug 12, 2012, 12:18:08 PM8/12/12
to
There is a limited execio emulator in the hostemu extension available with ooRexx. Whether it is plug-compatible with the execio emulator from personal rexx I could not say.

Jeremy Nicoll - news posts

unread,
Aug 12, 2012, 1:48:17 PM8/12/12
to
Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:

>OOREXX does not support the EXECIO command

It does, via: address hostemu, a recent addition. The V4.1.1 version aborts
in some builds though; I expect the fixes will probably be released soon.

Gerard_Schildberger

unread,
Aug 12, 2012, 4:36:05 PM8/12/12
to
Yes, EXECIO is in PC/REXX, Personnal REXX, R4, and ROO (ROO!);
although the R4 and ROO version is different, of course.
____________________________________________ Gerard Schildberger


Gerard_Schildberger

unread,
Aug 12, 2012, 4:46:25 PM8/12/12
to
Modern REXXes have WORDPOS which replace FIND,
POS which replace INDEX,
CHANGESTR
and COUNTSTR which doesn't replace ... anything.

Note that FIND and WORDPOS, INDEX and POS have their arguments
(needle, haystack) in different order than their "replacements".

Most, if not all, classic REXXes support both, of course.
______________________________________________ Gerard Schildberger


LesK

unread,
Aug 12, 2012, 8:44:09 PM8/12/12
to
On 8/12/2012 2:49 AM, Shmuel (Seymour J.) Metz wrote:
> In <5o8d28pn533q0prch...@4ax.com>, on 08/11/2012
> at 02:26 PM, Arthur T. <art...@munged.invalid> said:
>
>> I'm a current Regina REXX user, and I also wondered about going to
>> ooRexx. What happens in my programs that do rxfuncadd for packages
>> like RexxUtil, etc.? I believe that some of those functions are now
>> built in, but what will happen when those rxfuncadd (and
>> sysloadfuncs) statements are hit?
>
> If you have a function package for an incompatible API then you'll
> have to change it and recompile. I don't know whether the Regina API
> is compatible with the 32-bit OOREXX API, but there is a change going
> from 32-bit to 64-bit.
>
ooRexx has it's own RexxUtil, which is built-in. The 32 bit API is
compatible at the binary level. That's why 32 bit ooRexx is recommended
for backward compatibility with other pre-existing programs.

Unless you have a real need for some of the unique capabilities of
ooRexx, like interfacing to MS Excel or other OLE MS products, you might
as well stay with Regina.

LesK

unread,
Aug 12, 2012, 8:50:07 PM8/12/12
to
Probably not. The HostEmu version is modeled on the TSO hack, presumably
by some beginning programmer, of the original CMS version of EXECIO.

LesK

unread,
Aug 12, 2012, 8:54:15 PM8/12/12
to
On 8/11/2012 10:14 PM, Shmuel (Seymour J.) Metz wrote:
> In <k054eo$sbt$1...@speranza.aioe.org>, on 08/11/2012
> at 04:17 AM, LesK <5mr...@tampabay.rr.com> said:
>
>> Since Personal Rexx is modeled on the original CMS Rexx, you have
>> to consider some other possible ooRexx incompatibilities:
>
> OOREXX does not support the EXECIO command; I don't recall whether
> that was in Personal REXX.
>
EXECIO is not part of the Rexx language. It is part of CMS and later
hacked onto TSO.

Shmuel Metz

unread,
Aug 13, 2012, 10:04:54 AM8/13/12
to
In <k09j78$67g$3...@speranza.aioe.org>, on 08/12/2012
at 08:54 PM, LesK <5mr...@tampabay.rr.com> said:

>EXECIO is not part of the Rexx language.

Neither is REXXUTIL.

Shmuel Metz

unread,
Aug 13, 2012, 10:03:05 AM8/13/12
to
In <k09ika$5fr$1...@speranza.aioe.org>, on 08/12/2012
at 08:44 PM, LesK <5mr...@tampabay.rr.com> said:

>The 32 bit API is compatible at the binary level.

Compatible with what? Quercus Personal REXX? Regina? SAA REXX?
Proprietary OREXX? Older versions of OOREXX? All of the above?

LesK

unread,
Aug 13, 2012, 12:09:28 PM8/13/12
to
On 8/13/2012 10:04 AM, Shmuel (Seymour J.) Metz wrote:
> In <k09j78$67g$3...@speranza.aioe.org>, on 08/12/2012
> at 08:54 PM, LesK <5mr...@tampabay.rr.com> said:
>
>> EXECIO is not part of the Rexx language.
>
> Neither is REXXUTIL.
>
We were discussing the _Rexx language_, not add-ons included with a
particular implementation to mimic what is available in CMS.

LesK

unread,
Aug 13, 2012, 12:13:03 PM8/13/12
to
On 8/13/2012 10:03 AM, Shmuel (Seymour J.) Metz wrote:
> In <k09ika$5fr$1...@speranza.aioe.org>, on 08/12/2012
> at 08:44 PM, LesK <5mr...@tampabay.rr.com> said:
>
>> The 32 bit API is compatible at the binary level.
>
> Compatible with what? Quercus Personal REXX? Regina? SAA REXX?
> Proprietary OREXX? Older versions of OOREXX? All of the above?
>
Compatible with any program that implements the SAA API as defined in
the IBM manuals. I know, for instance, that Regina does, as well as
ooRexx prior to 4.0 (iirc).

Arthur T.

unread,
Aug 13, 2012, 11:31:25 PM8/13/12
to
In Message-ID:<k09ika$5fr$1...@speranza.aioe.org>,
LesK <5mr...@tampabay.rr.com> wrote:

>ooRexx has it's own RexxUtil, which is built-in. The 32 bit API is
>compatible at the binary level. That's why 32 bit ooRexx is recommended
>for backward compatibility with other pre-existing programs.

Unfortunately, the built-in RexxUtil does not contain everything
Patrick McPhee's does. I installed ooRexx and tried it for a few of
my existing programs. Running one, I got:
Error 43.1: Could not find routine "REGSTEMREAD"

And, sure enough, the documentation doesn't show any of the
REGxxx functions.

I'm sure that there are equally good, or better, ways to read a
file into a stem (or array). That's wonderful for new programs. But
apparently ooRexx is not going to be fully upward compatible from my
Regina-plus-packages environment. I have a lot of existing programs,
so I don't think I'll be able to make ooRexx my default interpreter.

>Unless you have a real need for some of the unique capabilities of
>ooRexx, like interfacing to MS Excel or other OLE MS products, you might
>as well stay with Regina.

There are a few ooRexx capabilities I'd have liked to use, but I
forget what they are, just now. OTOH, it also looks like the most
painless way to learn oo. I can start using and understanding oo
concepts while still writing procedurally.

Glenn Knickerbocker

unread,
Aug 13, 2012, 11:37:42 PM8/13/12
to
On Sun, 12 Aug 2012 13:46:25 -0700 (PDT), Gerard_Schildberger wrote:
>Note that FIND and WORDPOS, INDEX and POS have their arguments
>(needle, haystack) in different order than their "replacements".

And that was responsible for the one downward incompatibility in the
CMS/TSO Rexx compiler. Release 1 didn't include separate FIND and INDEX
routines and actually substituted the swapped arguments into calls to
WORDPOS and POS. But this meant that side effects of evaluating the
arguments occurred in the wrong order (I forget who got the Sachertorte
for finding that). So the missing functions were added. When programs
that use FIND and INDEX were compiled on later releases, they couldn't
use the Release 1 runtime library, because it didn't include those
functions.

ŹR Where'd they come from, these guys? And why does it smell
o|-< ><> like herring and straw in here all of a sudden?
http://users.bestweb.net/~notr/engel.html --Kevin S. Wilson

Gerard_Schildberger

unread,
Aug 14, 2012, 12:37:38 AM8/14/12
to
On Monday, August 13, 2012 10:37:42 PM UTC-5, Glenn Knickerbocker wrote:
> On Sun, 12 Aug 2012 13:46:25 -0700 (PDT), Gerard_Schildberger wrote:
>
> >Note that FIND and WORDPOS, INDEX and POS have their arguments
>
> >(needle, haystack) in different order than their "replacements".
>
>
>
> And that was responsible for the one downward incompatibility in the
>
> CMS/TSO Rexx compiler. Release 1 didn't include separate FIND and INDEX
>
> routines and actually substituted the swapped arguments into calls to
>
> WORDPOS and POS. But this meant that side effects of evaluating the
>
> arguments occurred in the wrong order (I forget who got the Sachertorte
>
> for finding that). So the missing functions were added. When programs
>
> that use FIND and INDEX were compiled on later releases, they couldn't
>
> use the Release 1 runtime library, because it didn't include those
>
> functions.
>
>
>
> ¬R Where'd they come from, these guys? And why does it smell
>
> o|-< ><> like herring and straw in here all of a sudden?
>
> http://users.bestweb.net/~notr/engel.html --Kevin S. Wilson

I remember one big reason my company didn't jump on it at the getgo was
that Release 1 didn't support INTERPRET or SOURCELINE (as I recall).
There were other bugs, and we CMSers were used to REXX --never-- failing.
One bug that I tripped on was that if the REXX program was exactly some
small number of bytes (mine was 17 bytes), it crashed in dramatic fashion.

One other financial obstacle was that it was a Program Product (or some
other such name), and some of our users (who had their own mainframes)
didn't want to pay for a product they didn't especially want, so it
became the "weakest link" in our development/deployment chain, and we
(sysprogs) couldn't write compiled REXX programs that weren't supported
on all platforms. Release 2 was eventually acquired for the bigger
mainframes, but only used marginally. _______________ Gerard Schildberger

Jeremy Nicoll - news posts

unread,
Aug 14, 2012, 4:08:46 AM8/14/12
to

> I'm sure that there are equally good, or better, ways to read a
>file into a stem (or array). That's wonderful for new programs. But
>apparently ooRexx is not going to be fully upward compatible from my
>Regina-plus-packages environment. I have a lot of existing programs,
>so I don't think I'll be able to make ooRexx my default interpreter.

But you could write a function to do whatever REGSTEMREAD did and put it
somewhere in the search order and it would work?

Sahananda

unread,
Aug 14, 2012, 5:11:43 AM8/14/12
to
That's the spirit. You could make a rexxutilpjmt compatibility library and requires it when you needed.

Although I no longer enjoy working with stems here is my offering for regstemread.

It could probably be improved in terms of explicitly closing the stream and there may be performance enhancements to be made:


call regstemread 'c:\test.txt', s.

do i = 1 to s.0
say s.i
end /* DO */

/* =========================== */
::routine regstemread public
/* =========================== */
use arg filename, stem.

array = .stream~new(filename)~arrayIn

stem.~empty

do i = 1 to array~items
stem.[i] = array[i]
end /* DO */

stem.0 = array~items

Shmuel Metz

unread,
Aug 13, 2012, 6:18:09 PM8/13/12
to
In <k0b8r8$rjk$1...@speranza.aioe.org>, on 08/13/2012
at 12:09 PM, LesK <5mr...@tampabay.rr.com> said:

>We were discussing the _Rexx language_,

No, we were discussing REXX language processors for PC's. Ub fact, the
OP asked about an editor, which isn't even part of any REXX
distribution I'm aware of, much less the language.

Jeremy Nicoll - news posts

unread,
Aug 14, 2012, 9:50:02 AM8/14/12
to
Shmuel (Seymour J.) Metz <spam...@library.lspace.org.invalid> wrote:


> Ub fact, the OP asked about an editor, which isn't even part of any REXX
> distribution I'm aware of, much less the language.

I have a feeling that one of Jeff Glatt's versions - either his original
Reginald or the 'lite' successor came with an integrated IDE.

Glenn Knickerbocker

unread,
Aug 14, 2012, 11:22:55 PM8/14/12
to
On Tue, 14 Aug 2012 02:11:43 -0700 (PDT), Sahananda wrote:
> do i = 1 to array~items
> stem.[i] = array[i]
> end /* DO */

I was going to say there was no need to do them one by one:

stem.~putAll(array)

But I had a nagging memory of having spotted a problem with that before.
PUTALL appears to take about 20% longer and 40% more storage than the
loop for some reason.

�R "MY FLIEGENDE HOLL�NDER WON'T STOP BLEEEEEEING!" --Poot
<http://users.bestweb.net/~notr/magictop.html> Rootbeer

LesK

unread,
Aug 15, 2012, 12:21:58 AM8/15/12
to
I hope you opened a bug report so it could get fixed.

Sahananda

unread,
Aug 15, 2012, 2:24:53 AM8/15/12
to
On Wednesday, August 15, 2012 4:22:55 AM UTC+1, Glenn Knickerbocker wrote:
> On Tue, 14 Aug 2012 02:11:43 -0700 (PDT), Sahananda wrote:
>
> > do i = 1 to array~items
>
> > stem.[i] = array[i]
>
> > end /* DO */
>
>
>
> I was going to say there was no need to do them one by one:
>
>
>
> stem.~putAll(array)
>
>
>
> But I had a nagging memory of having spotted a problem with that before.
>
> PUTALL appears to take about 20% longer and 40% more storage than the
>
> loop for some reason.
>
>
>
> ¬R "MY FLIEGENDE HOLLÄNDER WON'T STOP BLEEEEEEING!" --Poot
>
> <http://users.bestweb.net/~notr/magictop.html> Rootbeer

Hey Glenn, that's neat - but it doesn't seem to be documented - at least not in the 4.1.0 rexxref. However, I tried it and it works and applies the array elements to the correctly numbered stem variables.

Slow performance: I took a look at the code for the putall method. It is written in Rexx and fairly straightforward.

The file is main\trunk\interpreter\RexxClasses\CoreClasses.orx

Collections that inherit from the set class (which doesn't include stem) just do what I did and loop over the array, however, because the target can be all sorts of collections, it does a makearray first. Which might slow it down a bit.

On the other hand, collections that inherit from the mapcollection class (such as stems) use a supplier object to retrieve the data and index, and I wouldn't be surprised if that slows things down considerably.

There might be a case for making an array a special case in the mapCollection putAll method, except that the array might be sparse, which would cause problems.
So collection A would have to be a special case where A~isA(.array) and A~size = A~items.

I will report the omission of putAll from the list of inherited methods in the rexxref when we get sourceforge back (the ooRexx Site is currently undergoing an upgrade)

Jon

Sahananda

unread,
Aug 15, 2012, 3:09:45 AM8/15/12
to
On Wednesday, August 15, 2012 7:24:53 AM UTC+1, Sahananda wrote:
...
> I will report the omission of putAll from the list of inherited methods in the rexxref when we get sourceforge back (the ooRexx Site is currently undergoing an upgrade)
>
> Jon
My mistake - it is in the rexxRef - as it is the only method inherited from the mapCollection class it was easy for me to overlook.

Jon

Sahananda

unread,
Aug 15, 2012, 3:52:11 AM8/15/12
to
Ok. Here is a regStreamread routine with the improvements mentioned.

To use it as a start of a compatibility class, save it in a file called for instance 'rexxutilpjtm.cls' and save this on your path.

Where you have code that needs regstemread, you just have to place
::requires 'rexxutilpjtm.cls'
in the appropriate place to make it available throughout your script.

If there are no other directives (lines starting with ::) in your script then put it at the end. If there are other directives, then place it immediately before the first directive.

As you require other functions from Patrick McPhee's RexxUtil you can add them to this library.

Jon

/* =========================== */
::routine regstemread public
/* =========================== */
use arg filename, stem.

Stream = .stream~new(filename)
Array = Stream~charin(,Stream~chars)~makeArray
Stream~close

stem.~empty
-- as we know the array is not sparse
-- we can do an indexed loop
-- which is more efficient than stem.~putall
do i = 1 to array~items
stem.[i] = array[i]
end /* DO */
stem.0 = array~items

Swifty

unread,
Aug 15, 2012, 5:43:35 AM8/15/12
to
On Sat, 11 Aug 2012 02:52:55 -0400, LesK <5mr...@tampabay.rr.com>
wrote:

>Of course if you're storage limited, perhaps running on something like
>the Raspberry Pi, that has to be considered.

The external file will potentially get read each time it is
referenced. It will probably get cached somewhere, but even so it is
extra overhead.

I ran the simplest possible benchmark, calling an external function on
disk, and the same function in a ::routine

My loop had 10000 iterations, the disk routine took 5.7 seconds, the
::Routine took 0.062 seconds � 92 times faster.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Swifty

unread,
Aug 15, 2012, 5:47:36 AM8/15/12
to
On Sun, 12 Aug 2012 02:17:44 -0400, LesK <5mr...@tampabay.rr.com>
wrote:

>Is there any technical reason why we couldn't have the equivalent of
>EXECLOAD and not have to do ::Requires?

I believe that Object Rexx has a mechanism which allows you to load
function packages. When I looked at it, I decided not to bother, for
my meagre needs.

When Object Rexx first appeared, I was quite "::" averse; it seemed
too "comp-sci" for an old coder like me. But I've grown accustomed to
it now, and wouldn't be without it.

Swifty

unread,
Aug 15, 2012, 5:55:29 AM8/15/12
to
On Fri, 10 Aug 2012 10:40:40 -0400, Shmuel (Seymour J.) Metz
<spam...@library.lspace.org.invalid> wrote:

>Why do you need a special editor?

I find a syntax colour highlighting scheme useful in pointing out
mistakes like unpaired "/* */" and things like:

Cal subroutine

The editor that I use can comment/uncomment blocks of code (using
"--") with a single keystroke. That's not too special, but not all
editors can do this, and it is something that I do frequently.

Swifty

unread,
Aug 15, 2012, 5:58:58 AM8/15/12
to
On Fri, 10 Aug 2012 23:35:39 -0700, Jennifer Murphy
<JenM...@jm.invalid> wrote:

>And what editor is that?

I use EditpadPro which is a commercial product, but not overly
expensive, but I don't want to start an "Editor War" (probably too
late)

Swifty

unread,
Aug 15, 2012, 6:11:34 AM8/15/12
to
On Mon, 13 Aug 2012 23:37:42 -0400, Glenn Knickerbocker
<No...@bestweb.net> wrote:

>I forget who got the Sachertorte
>for finding that

I suspect that the box for that particular Sachertorte is in my garage
somewhere, filled with assorted screws. I seem to recall winning three
of them. I'm still dieting!

P.S. if anyone wants a novel/easy diet, I picked up one that works in
mice (from New Scientist), so I'm trying it on my body. 10kg/22lb in
about 8 weeks (and I took three weeks off). I'm also allowed to eat
almost anything I desire...

Jeremy Nicoll - news posts

unread,
Aug 15, 2012, 7:21:01 AM8/15/12
to
Swifty <steve....@gmail.com> wrote:

> I'm also allowed to eat almost anything I desire...

It's always been ok to 'eat' anything you want; swallowing it is the bit you
need to avoid.

LesK

unread,
Aug 15, 2012, 9:32:25 AM8/15/12
to
On 8/15/2012 5:47 AM, Swifty wrote:
> On Sun, 12 Aug 2012 02:17:44 -0400, LesK <5mr...@tampabay.rr.com>
> wrote:
>
>> Is there any technical reason why we couldn't have the equivalent of
>> EXECLOAD and not have to do ::Requires?
>
> I believe that Object Rexx has a mechanism which allows you to load
> function packages. When I looked at it, I decided not to bother, for
> my meagre needs.
>
> When Object Rexx first appeared, I was quite "::" averse; it seemed
> too "comp-sci" for an old coder like me. But I've grown accustomed to
> it now, and wouldn't be without it.
>
I expect that the mechanism for function packages in Object Rexx was the
same as what we have in ooRexx and, unless I'm missing something, it
can't handle Rexx code, like EXECLOAD can!

Glenn Knickerbocker

unread,
Aug 15, 2012, 9:36:13 AM8/15/12
to
On Tue, 14 Aug 2012 23:24:53 -0700 (PDT), Sahananda wrote:
>On Wednesday, August 15, 2012 4:22:55 AM UTC+1, Glenn Knickerbocker wrote:
>> stem.~putAll(array)
>Hey Glenn, that's neat - but it doesn't seem to be documented - at least
>not in the 4.1.0 rexxref.

Well, I'm glad to know I'm not the only one that had trouble spotting it
(again)--but it is at least listed under inherited methods.

ŹR - At Ebay you'll find a great range of Doom
<http://users.bestweb.net/~notr/bluemoon.html>

Shmuel Metz

unread,
Aug 16, 2012, 4:48:12 AM8/16/12
to
In <v5sm28lru2ecn6d4v...@4ax.com>, on 08/15/2012
at 10:55 AM, Swifty <steve....@gmail.com> said:

>I find a syntax colour highlighting scheme useful

Don't most modern text editors support that?

Shmuel Metz

unread,
Aug 15, 2012, 9:06:04 AM8/15/12
to
In <6rrm28tioekv60t4m...@4ax.com>, on 08/15/2012
at 10:47 AM, Swifty <steve....@gmail.com> said:

>I believe that Object Rexx has a mechanism which allows you to load
>function packages.

Yes, e.g., RexxRegisterFunctionDll, in addition to RXFFUNCADD from the
REXX program. I don't know whether that API was carried forward to
OOREXX.

Mark Miesfeld

unread,
Aug 17, 2012, 11:59:03 AM8/17/12
to
On Aug 12, 10:48 am, Jeremy Nicoll - news posts
<jn.nntp.scrap...@wingsandbeaks.org.uk> wrote:
> Shmuel (Seymour J.) Metz <spamt...@library.lspace.org.invalid> wrote:
>
> >OOREXX does not support the EXECIO command
>
> It does, via: address hostemu, a recent addition.  The V4.1.1 version aborts
> in some builds though; I expect the fixes will probably be released soon.

The fix is in ooRexx 4.1.2, which is in beta now. I expect the
official release to be out by the end of this month.

You can download the beta from:

https://sourceforge.net/projects/oorexx/files/oorexx/4.1.2%20%28beta%29/

--
Mark Miesfeld
0 new messages