Discussion:
Issue with CBL_OR
(too old to reply)
Bruce Axtens
2024-03-25 09:23:52 UTC
Permalink
What have I broken here? Based on code in
https://gnucobol.sourceforge.io/faq/GnuCOBOLFAQ.pdf
...
01 LOGICALS.
03 ITEM-1 PIC 999 USAGE COMP-5.
03 ITEM-2 PIC 999 USAGE COMP-5.
03 RESULT USAGE BINARY-LONG.
...
LOGICAL-OR.
INITIALIZE RESULT.
CALL "CBL_OR" USING ITEM-1 ITEM-2 BY VALUE 1
RETURNING RESULT.
DISPLAY ITEM-1 SPACE ITEM-2 SPACE RESULT.
EXIT.

ITEM-1 ITEM-2 RESULT
00001 00253 +0000000000
00002 00253 +0000000000
00004 00253 +0000000000
00008 00253 +0000000000
00016 00253 +0000000000
00032 00253 +0000000000
00064 00253 +0000000000
00128 00253 +0000000000

Why do I only get +0?
--
-
Bruce M. Axtens
https://github.com/axtens
https://exercism.org/profiles/axtens
Timezone: Australia/Perth
Bruce Axtens
2024-03-25 09:31:11 UTC
Permalink
That's running on GnuCOBOL 3.2
--
-
Bruce M. Axtens
https://github.com/axtens
https://exercism.org/profiles/axtens
Timezone: Australia/Perth
Loading...