[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU-COBOL] Cobol Math?!?



Matthew,

One thing that I think you will want to keep in mind is the original purpose
and platforms that Cobol was developed for.  Cobol is not a mathematical
language.  Your basic set of operators is complete for an ANSI 74
implementation.  In Cobol, the priority for math is operation on character
and BCD numeric variables.  The concept of floats and integers need to be in
the context of these data types.  This means that functions like MOD are
implemented by dividing with the result going to a V999 type field.

Do you have a Cobol grammar manual that describes the data types and
operations?

Glen
-----Original Message-----
From: Matthew Fischer <mfischer@umr.edu>
To: gnu-cobol@acm.cs.umr.edu <gnu-cobol@acm.cs.umr.edu>
Date: Thursday, October 22, 1998 11:29 AM
Subject: [GNU-COBOL] Cobol Math?!?


> What mathematical operators do I need to implement, ie. what does Cobol
> have?  I assume +,-,*,/ and power (^).  Anything else?
>
>
>--
>This message was sent through the gnu-cobol mailing list.  To remove
yourself
>from this mailing list, send a message to gnu-cobol@acm.cs.umr.edu with the
>words "unsubscribe gnu-cobol" in the message body.  For more information on
>the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.
>


--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to gnu-cobol@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.