In translating my theorem prover from True BASIC (TB) to Ada95 for hardware
embedding, I programmed these string utilities into specification files (.ads),
implementation body files (.adb), and respective test files (.adb).
The TB string utilities are listed alphabetically with order of visibility.
In other words, Divide 01 is instantiated to appear before RepChar$ 26.
CharInt$ 20
Chars$ 21
Control$ 16
Cpos 07
Cposr 08
DelChar$ 22
DelStr$ 23
Divide 01
KeepChar$ 18
LJust$ 12
Lower$ 13
MapChar$ 24
Max 03
Max_num 15
Min 09
Ncposr 10
NoSpace$ 25
NPlugChar$ 19
Pos 05
Posr 06
RepChar$ 26
RepStr$ 17
Round 02
Uniq$ 11
Upper$ 14
Ada 95 et seq is difficult to use for string manipulation because the language
was developed by programmers who were not educators and not by mathematicians
who were professional educators as was TB.
Consequently I do not necessarily trust string manipulation utilities in Ada.
In fact, many of the TB string utilities outperform the string attributes of Ada
due to better implementation approaches. The source code for TB is found in StrLib.
The test cases are from the examples in the TB Gold Manual.
A lesson learned is the genius of Kemeny and Kurtz in the simplicity of treating
numbers as IEEE floats and strings as character strings. (Ada attempts the latter
with strings as declared arrays of characters, but a string series is of a different
"type" than a character series.) In translation to Ada 95 there are many invocations
of Integer to Float and between string (of a fixed length) to unbounded string (of
a variable length). Ada is very rigid in that declaring a string has that length for
the duration of that string. My translation from TB to Ada 95 amounts to a retrofit
of Ada 95 to its big brother TB.
The Ada 95 code for the above as intellectual property is not being dumped into the
public domain under the misguided philanthropic ruse of GNU licensing for unsupported
open source upon which academic profiteers swoop. The example is AdaCore's gcc
GNAT to reincarnate tax funded Ada products from NYU for huge profit: three seats is
now $22,000 plus maintenance, hence prices are not advertised.
Colin James III, info@cec-services.com, info@ersatz-systems.com, +1 (719) 210-9534.