[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU-COBOL] PIC -> edit masks -> a standard largenumericrepresentation
>>> "David L. Nicol" <david@kasey.umkc.edu> 10/28/99 03:03PM >>>
Boris Kortiak wrote:
>
> >>> "David L. Nicol" <david@kasey.umkc.edu> 10/28/99 11:06AM >>>
> DN-
> <snip>
>
> Records could then be stored as arrays of these 10-byte things,
>
BK-
<snip>
> On the other hand, if you mean that internal to the compiler this is how numbers would be represented, manipulated and compared, maybe.
<snip>
DN-
I'm talking about internal to the running, compiled program. I think
sacrificing memory footprint for ease of development is the right thing
here. Implementing a "cobol scalar" on top of some other general
purpose
data type like a MFC "string" or a perl scalar, and tieing that object
with a tightly formatted little data element that represents the PIC
for that datum looks like a reasonable way to go for internal run-time
data handling.
BK-
Ok, if I got this... The PIC part of the structure would then let you know what types of actions can be performed on the number, what significant digits are available. I don't know if 8 bits would be enough...
DN-
Conversion tools would have to be able to pack and unpack into the
various formats to take care of Brilliant Pic Tricks as discussed here
previously but IMO implementing a BCD math library and referring to it
whenever you want an addition is silly today.
BK-
Definitely non-trivial
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.