• Issue with CBL_OR

    From Bruce Axtens@snetxa@hotmail.com to comp.lang.cobol on Mon Mar 25 17:23:52 2024
    From Newsgroup: comp.lang.cobol

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Bruce Axtens@snetxa@hotmail.com to comp.lang.cobol on Mon Mar 25 17:31:11 2024
    From Newsgroup: comp.lang.cobol

    That's running on GnuCOBOL 3.2
    --
    -
    Bruce M. Axtens
    https://github.com/axtens
    https://exercism.org/profiles/axtens
    Timezone: Australia/Perth

    --- Synchronet 3.20a-Linux NewsLink 1.114