Groups | Search | Server Info | Login | Register
Groups > comp.lang.cobol > #12850
| From | Bruce Axtens <snetxa@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.cobol |
| Subject | Issue with CBL_OR |
| Date | 2024-03-25 17:23 +0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <utrfr9$10cvb$1@dont-email.me> (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
Back to comp.lang.cobol | Previous | Next — Next in thread | Find similar
Issue with CBL_OR Bruce Axtens <snetxa@hotmail.com> - 2024-03-25 17:23 +0800 Re: Issue with CBL_OR Bruce Axtens <snetxa@hotmail.com> - 2024-03-25 17:31 +0800
csiph-web