Hi,

On Fri, Sep 13, 2024 at 10:01 PM Paul Dufresne via Freedos-devel
<freedos-devel@lists.sourceforge.net> wrote:
>
> It began when I did read:
> https://bttr-software.de/forum/board_entry.php?id=22023
>
> Anyway, I wrote a small program to convert units ... it is using a bit 
> sophisticated stuff... making it sadly probably not usable for DOS as is.
>
> -- The following 2 calls are for loading regutil library
> -- it is needed only for regStemDoOver
> -- to work, program must be called with regina rather than rexx
> -- Because of this, it is believe the program cannot run under DOS
> call RxFuncAdd 'sysloadfuncs', 'regutil', 'sysloadfuncs'
> call sysloadfuncs

I did not run (test) your code, but keep in mind ....

The main thing to remember is that REXX has different dialects. You
can even check at runtime and branch accordingly based upon host OS or
language version.

* Mike Cowlishaw's _The Rexx Language_ (2nd edition, 1990) is commonly
called TRL2, aka version 4.
* ANSI standard REXX from 1996, e.g. Regina, calls itself version 5.
* OORexx calls itself version 6 (actually, 6.03, last I checked).

So there are some differences, esp. with regards to how external
stacks are handled or whether to use ADDRESS SYSTEM WITH or other
features. Just because code works in one interpreter doesn't mean it
will work (at all) on others unless you are very careful and test
accordingly and limit non-standard extensions. That may not matter for
local code, but for anything public or "portable", you have to be more
careful.

For instance, Ada-like single-line comments -- are not standard and
are only supported by Regina (IIRC).

N.B. Howard Fosdick's 2005 REXX book is now a free download and quite
exhaustive (highly recommended):

* the https://rexxinfo.org/tutorials/index_tutorials.html

You may also wish to read up on other REXX pitfalls:

* 
http://web.archive.org/web/20210314104341/http://www.edm2.com/index.php/Common_REXX_Pitfalls

"do over" is only in OORexx, is that right? I haven't really messed
with that one much, but normal practice seems to be to manually put
the size of the stem (array) in stem.0 and loop over that, e.g. "do
i=1 to stem.0; say stem.i; end".

I'm far from super experienced with REXX, but I've dabbled with it a
bit, off and on.


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to