• Problem with UNSTRING (or problem with me)

    From Bruce Axtens@21:1/5 to All on Wed Aug 3 06:30:32 2022
    Given
    01 WS-SIDES PIC X(20).
    01 WS-SIDE-NUMBERS PIC 99V9
    OCCURS 3 TIMES
    INDEXED BY SIDE-INDEX.
    and
    UNSTRING WS-SIDES DELIMITED BY ALL ','
    INTO WS-SIDE-NUMBERS(1)
    WS-SIDE-NUMBERS(2)
    WS-SIDE-NUMBERS(3)
    END-UNSTRING.
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    with WS-SIDES containing '0.5,0.4,0.6', I'm consistently getting "00.5 00.4 00.4" displayed. Why isn't the 0.6 ending up in WS-SIDE-NUMBERS(3)?

    -- Bruce

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From docdwarf@panix.com@21:1/5 to bruce.axtens@gmail.com on Wed Aug 3 15:11:19 2022
    In article <57264bfc-416e-4d54-9895-345f8281376bn@googlegroups.com>,
    Bruce Axtens <bruce.axtens@gmail.com> wrote:

    [snip]

    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    with WS-SIDES containing '0.5,0.4,0.6', I'm consistently getting "00.5
    00.4 00.4" displayed. Why isn't the 0.6 ending up in WS-SIDE-NUMBERS(3)?

    DD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Axtens@21:1/5 to docd...@panix.com on Wed Aug 3 16:53:18 2022
    On Wednesday, 3 August 2022 at 11:11:22 pm UTC+8, docd...@panix.com wrote:
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE WS-SIDE-NUMBERS(2).

    Yep, problem with me. How to look stupid. Sigh. Won't be the last time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From docdwarf@panix.com@21:1/5 to bruce.axtens@gmail.com on Thu Aug 4 00:55:09 2022
    In article <862a935a-95a4-44e1-bed0-3d928966b476n@googlegroups.com>,
    Bruce Axtens <bruce.axtens@gmail.com> wrote:
    On Wednesday, 3 August 2022 at 11:11:22 pm UTC+8, docd...@panix.com wrote:
    DISPLAY WS-SIDE-NUMBERS(1) SPACE WS-SIDE-NUMBERS(2) SPACE >WS-SIDE-NUMBERS(2).

    Yep, problem with me. How to look stupid. Sigh. Won't be the last time.

    Gently, Mr Axtens. The best way I know to learn to find the mistakes is
    to have made them, yourself.

    DD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)