Tony,

You were too polite to say so, but the current rules also make little
sense for SETAF and SETCF.

SETCF is, however, usable.

In order, for example, to obtain the absolute value of a complex
number, ABS(a + bi), for some table-generation applications I wrote a
SETCF routine in PL/I that accepted two external engineering-notation
character strings, signed a and b,  converted them into internal DFP
values, implicitly calculated

D = +sqrt(a**2 +b**2)

using the generic PL/I bif ABS, converted D back into an external
engineering-notation character string, and returned it to the
assembler.

This is, I suppose, baroque; but it is much better than trying to do
floating-point arithmetic interpretively in the macro language.  (I
have worked out how to normalize and compare/sort engineering-notation
values in the macro language, but I have balked at writing macros to
obtain the square root of one or to multiply a pair of them together.)

John Gilmore, Ashland, MA 01721 - USA

Reply via email to