In many cases, the user may simply specify 1.75E+6, the context will
determine both the format and the length, and everything will be fine.

However, there are other computational situations where the use of a
particular format and/or length is important, and the choice of an incorrect
format and/or length may result in miniscule computational errors, which
then grow into significant errors through a subsequent series of
computations.

It is therefore necessary that the capability to specify formats and lengths
be present.

I am currently considering suffix characters of "B" (binary), "D" (decimal),
and "H" (hexadecimal).

However, I need to come up with a scheme for the specification of length.
"S" (single) and "Q" (quad) would seem to work, but "D" (double) would
already be in use as "D" (decimal).

John P. Baker

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Binyamin Dissen
Sent: Sunday, April 27, 2008 2:20 PM
To: [email protected]
Subject: Re: Fixed-Point and Scientific Notation

If I recall correctly, FORTRAN/PLI needed explicit exponentiation, i.e.,

    DOUBLE A,B
        .
    A = B+1.23

would use a short 1.23 rather than determining that the other operands were
double thus 1.23 should be treated as a double as well.

One had to do

    A = B+1.23D0

It would behoove you to determine the context to generate the best values. 

If your parser will support scaled values, 1.23 may not even be a floating
point number - it may be a fixed scaled value.

In general it is best to make things easier for the carbon life forms
creating
and using the data rather than the silicon non-life forms processing the
data
(even if it does cause more initial work for the carbon life forms
programming
the silicon).

--
Binyamin Dissen <[EMAIL PROTECTED]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to