On Sun, 27 Apr 2008 14:37:10 -0400 "John P. Baker" <[EMAIL PROTECTED]>
wrote:

:>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.

In which cases would it not be resolvable via context?

:>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).

I would suggest that if the format cannot be determined by context, that the
raw data as specified be retained with a flag indicating the situation. Then
when finally used it can be properly handled.

Such as

             FIELD1 = 1.23

Without knowing what "FIELD1" is, the data cannot be properly stored to be
used as is. But it can be retained as a scaled fixed field (which would be
exact) and then when used in a floating point expression be properly converted
to the correct form.

But, all in all, it ain't my dog.

:>-----Original Message-----
:>From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
:>Of Binyamin Dissen
:>Sent: Sunday, April 27, 2008 2:20 PM
:>To: IBM-MAIN@BAMA.UA.EDU
:>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


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
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