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.
Anonymous
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 . ""
Code committed [r9634]
Docs committed [r9633]
Related
Commit: [r9633]
Commit: [r9634]