COMP vs COMP‑3 arithmetic surprises

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Aakash Kochar
New Member
Posts: 9
Joined: Mon Aug 04, 2014 2:31 pm

COMP vs COMP‑3 arithmetic surprises

Post by Aakash Kochar »

Seeing different rounding/precision between COMP and COMP‑3. How do you choose types to avoid bugs? Thanks in advance for sharing your thoughts.
User avatar
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 855
Joined: Wed Sep 11, 2013 3:57 pm

Re: COMP vs COMP‑3 arithmetic surprises

Post by enrico-sorichetti »

read the manual and/or search for "differences between COBOL COMP COMP3"

hint ...
COMP binary numbers
COMP3 packed decimal numbers

topic moved where it belongs ... the COBOL and friends section
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”