Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#354 Encode "address mode" into "parse version" string

v4.2.0
closed
Rick McGuire
None
complete
5
2014-04-15
2009-05-05
No

With the advent of ooRexx 4.0 a new, important need arises: determining which addressing mode
the running Rexx interpreter uses.

This is a vital information, if e.g. one writes installation scripts in ooRexx installing
native libraries that must match the bitness of the running (installed) ooRexx interpreter.

In a posting to oorexx-devel@lists.sourceforge.net from 2009-05-01 I presented this planned
RFE and suggested encodings of the "address mode" into the "parse version"-string such, that
the ANSI Rexx definitions would not be jeopardized.

As no objections were formulated in return of this posting, I would suggest to enhance the
"parse version"-string in the following manner, which makes it easy to parse the address mode
out of it:

REXX-ooRexx_4.0.0(MT)_32_bit 6.03 31 May 2009
REXX-ooRexx_4.0.0(MT)_64_bit 6.03 31 May 2009
REXX-ooRexx_4.0.0(MT)_128_bit 6.05 15 Dec 2015

I.e. append the string "_<ADDRESSSMODE>_bit" to the first word in the version string,
where <ADDRESSMODE> is a number representing the addressing mode (currently the value
"32" or "64").

Such an encoding would allow for the following keyword statement to extract the address mode:

parse version ")_" addressmode "_bit"

Even if the string may be extended in the future, this pattern would allow for parsing the
address mode reliably for good.

Discussion

  • I would recommend a slight change and use a hyphen instead of an underscore between addressmode and bit. This would permit parsing between informational segments in a readable form. For example:

    For programming purposes, rendering, at present, 32 or 64:

    parse version ")_" addressmode "-bit"

    For visual purposes, rendering "32-bit" or "64-bit", at present:

    parse version ")" addressmode . ""

     
  • Rick McGuire
    Rick McGuire
    2013-12-07

    • status: open --> pending
    • assigned_to: Rick McGuire
    • Pending work items: --> complete
    • Milestone: None --> v4.2.0
     


Anonymous


Cancel   Add attachments