For Programmers: Free Programming Magazines  


Home > Archive > Cobol > April 2008 > Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Fu









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Fu
Clark F Morris

2008-04-02, 6:59 pm

On Wed, 02 Apr 2008 02:45:10 GMT, "William M. Klein"
<wmklein@nospam.netcom.com> wrote:

>Clark,
> Can you try this (slight) variation - and compile
>
>01 numerator value 1 Comp-5 pic 9(9).
>01 denominator value 5 Comp-5 pic 9(9).
>01 quotient Comp-5 pic 9(9)v9(4).
>
>compute quotient = numerator / denominator
> display quotient
>
>My guess is that they would still be doing it in decimal, but this would "force"
>the compiler into knowing the fields were to be truncated/handeld in "true"
>binary rather than based on the PIC.

Frank is the person who did the compilation since I don't have access
to a z series computer (or a COBOL compiler). It would be interesting
to see the code generation for a computer that is basically binary
(Intel, HP, AIX boxes, etc.).
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com