Created <https://sourceforge.net/p/oorexx/feature-requests/859/>, commit 
[r13027] implements it.

It may take some time until Jenkins creates this ooRexx version and uploads it to Sourceforge at: <https://sourceforge.net/projects/oorexx/files/oorexx/5.2.0beta/>. Please test the command line version of "-o" on as many platforms and as good as you can!

Any feedback and suggestions are welcome.

---rony


On 20.10.2025 15:25, Rony G. Flatscher wrote:

Will be preparing a commit for the Rexx launcher "rexx.[exe]" for testing.

Here is the output of entering just "rexx":

    G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0>bin\rexx

    Syntax is "rexx*[-o[g] "options"]* filename [arguments]"
    or        "rexx -e program_string [arguments]"
    or        "rexx -v".

The new optional command line options are:

  * -o (override package options of program in filename only, do not change the 
package options of
    any called or required programs from it)
  * -og (override globally the package options: all programs that get loaded or 
required)

Here is a test Rexx program ("testarg.rex"):

    parse version v
    parse source s
    say "version:" pp(v)
    say "source :" pp(s)
    say

    parse arg args
    say "arg()  :" pp(arg()) "args="pp(args)
    if .local~hasentry("SYSCARGS") then
    do
        say ".sysCargs~items:" .sysCargs~items
        tab="09"x
        do counter c1 a over .sysCargs
           say tab 'arg #' c1~right(2)":" pp(a)
        end
    end
    else
        say "sysCargs: NO arguments, hence no sysCargs!"
    say
    say
    say "digits():" digits() "1000/1713:" pp(1000/1713)


    ::routine pp
       return "["arg(1)"]"

Here is the command and its output (Windows):

    G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0>*bin\rexx testargs.rex ab cd 
"oha dackel" nixi noxi*
    version: [REXX-ooRexx_5.2.0(MT)_64-bit 6.05 18 Oct 2025]
    source : [WindowsNT COMMAND 
G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex]

    arg()  : [1] args=[ab cd oha dackel nixi noxi]
    .sysCargs~items: 5
              arg #  1: [ab]
              arg #  2: [cd]
              arg #  3: [oha dackel]
              arg #  4: [nixi]
              arg #  5: [noxi]


    digits(): 9 1000/1713: [0.583771162]

Here, the command its output is using -o  (Windows):

    G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0>*bin\rexx /-o "::OPTIONS digits 27 trace 
label"/ testargs.rex ab cd "oha dackel" nixi noxi*
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
    version: [REXX-ooRexx_5.2.0(MT)_64-bit 6.05 18 Oct 2025]
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
    source : [WindowsNT COMMAND 
G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex]

            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
    arg()  : [1] args=[ab cd oha dackel nixi noxi]
    .sysCargs~items: 5
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
              arg #  1: [ab]
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
              arg #  2: [cd]
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
              arg #  3: [oha dackel]
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
              arg #  4: [nixi]
            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
              arg #  5: [noxi]


            >I> Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
            <I< Routine "PP" in package 
"G:\oorexx.tmp\oorexxBuild\debug64_branches_5_2_0\testargs.rex".
    digits(): 27 1000/1713: [0.583771161704611792177466433]

Will clean and tidy up the code in the next available time slot (may take quite some time) and commit it such that Jenkins can start to build and test the builds for all the many operating systems it supports, such that anyone interested in this can download it and test.

Once that is done, the documentation needs to be updated accordingly, and a few more unit tests created.

---rony



On 16.10.2025 14:01, Rony G. Flatscher wrote:

As I could run the full test suite on Windows successfully, I will commit the code and related unit tests in a short while.

Here a synopsis:

    The .Package class gets two new protected methods:

      * the protected class method "globalOptions" which allows to query and 
set override package
        options and an override count which controls whether the override 
package options get
        applied whenever a program/package gets newly called or required:
        globalOptions(option[,newValue])

          o option "OverridePackageOptions" (only first capital letter needed): 
returns a string
            formatted as an "::OPTIONS" directive showing all options and their 
values; if one
            supplies "newValue" it needs to be a string formatted as an 
"::OPTIONS" directive,
            which will be used from then on to override the internal package 
options on newly
            called or required programs.

          o option "CountOverride" (only first capital letter needed): returns 
the current
            countOverride value; if one supplies "newValue" it needs to be a 
whole number. If
            countOverride is 0, then no overrides take place. If count Override 
is a positive
            number n, the overrides take place n times. If count is a negative 
number like -1,
            then the overrides take place forever ("globally").

      * the protected instance method "options" which allows to query and set 
(individual)
        package options for the package: options ([option[,newValue]])

          o (no arguments): returns a string formatted as an "::OPTIONS" 
directive showing all
            options and their values

          o "All" (only first capital letter needed): this option mandates 
"newValue" which can
            be one of "Condition" or "Syntax"; it sets all conditions (Error, 
FAilure,
            Lostdigits, NOString, NOTready, NOValue) to "newValue"; it is an error to 
omit "newValue"

          o "Digits" (only first capital letter needed): returns the current 
digits() setting; if
            "newValue" is given it must be a positive whole number that is 
larger than fuzz()

          o "Error"  (only first capital letter needed): returns current 
condition's setting
            ("CONDITION"=default, "SYNTAX"); if "newValue" is given it must be either 
"Condition"
            or "Syntax"

          o "FAilure" (only first two capital letters needed): returns current 
condition's
            setting ("CONDITION"=default, "SYNTAX"); if "newValue" is given it 
must be either
            "Condition" or "Syntax"

          o "FOrm" (only first two capital letters needed): returns the current 
form() setting
            (either "SCIENTIFIC" or "ENGINEERING"); if "newValue" is given it 
must be either
            "Scientific" or "Engineering"

          o "FUzz" (only first two capital letters needed): returns the current 
 fuzz() setting;
            if "newValue" is given it must be a zero or a positive whole number 
that is smaller
            than digits()

          o "InitialPackageSettings"  (only first capital letter needed): 
returns a string
            formatted as an "::OPTIONS" directive showing all options and their 
values; one must
            not supply a "newValue" which would be regarded as an error

          o "Lostdigits" (only first capital letter needed): returns current 
condition's setting
            ("CONDITION"=default, "SYNTAX"); if "newValue" is given it must be either 
"Condition"
            or "Syntax"

          o "NOString" (only first three capital letters needed): returns 
current condition's
            setting ("CONDITION"=default, "SYNTAX"); if "newValue" is given it 
must be either
            "Condition" or "Syntax"

          o "NOTready" (only first three capital letters needed): returns 
current condition's
            setting ("CONDITION"=default, "SYNTAX"); if "newValue" is given it 
must be either
            "Condition" or "Syntax"

          o "NOValue" (only first three capital letters needed): returns 
current condition's
            setting ("CONDITION"=default, "SYNTAX"); if "newValue" is given it 
must be either
            "Condition" or "Syntax"

          o "Prolog"  (only first capital letter needed): returns current 
prolog s setting
            ("PROLOG"=default, "NOPROLOG"); if "newValue" is given it must be either 
"Prolog" or
            "Noprolog"

          o "Reset"  (only first capital letter needed): returns a string 
formatted as an
            "::OPTIONS" directive showing all options and their values; one 
must not supply a
            "newValue" which would be regarded as an error

          o "SetPackageOptions"  (only first capital letter needed): returns a 
string formatted
            as an "::OPTIONS" directive showing all options and their values 
and sets the package
            options to "InitialPackageSettings";  one must not supply a 
"newValue" which would be
            regarded as an error

          o "Trace"  (only first capital letter needed): returns a single 
letter indicating the
            trace option in effect ("A", "C", "E", "F", "I", "L", "N", "O", "R");  if 
"newValue"
            is given it needs to be one of "All", "Commands", "Error", 
"Failure",
            "Intermediates", "Labels", "Normal", or "Off"

To get at this version, check back with <https://sourceforge.net/projects/oorexx/files/oorexx/5.2.0beta/> in a little while, as Jenkins will create and test ooRexx on many operating systems each time commits occur to ooRexx' trunk.

---rony

_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to