• Trailing % in "write" output

    From Sidney Reilley@21:1/5 to All on Mon Oct 25 07:56:33 2021
    Noob here! Just an old tinkerer, trying to keep the grey cells
    active. :-)

    Using Okane's mumps implementation on a Debian-based Linux box.
    Reading T.L. Wiechmann's "MUMPS Programming I Student Guide".

    Testing the commands READ and WRITE.
    The routine works OK, but the output always has a trailing _%_ .
    Is this output buffer garbage? Do I need to flush the buffer first?
    If so, how? TIA ..

    Totally enjoying Mumps!!
    --
    Duke

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ed de moel@21:1/5 to All on Mon Oct 25 07:00:27 2021
    There should not be any trailing characters.
    Can you show the exact commands you are trying?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ed de moel@21:1/5 to All on Mon Oct 25 08:09:18 2021
    The rendition of white-space is always a problem on platforms like this, so it's hard to tell, but...
    In your example, all lines, except the ones with a label (READ and RESULTS), should start with a space.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sidney Reilley@21:1/5 to ed de moel on Mon Oct 25 08:15:12 2021
    On Mon, 25 Oct 2021 07:00:27 -0700 (PDT)
    ed de moel <eddemoel@gmail.com> wrote:

    There should not be any trailing characters.
    Can you show the exact commands you are trying?

    [code]
    #!/usr/bin/mumps

    ; routine to illustrate the commands
    ; DO, GOTO, and QUIT
    READ ; get date from the user
    read !!,"First Number: ",First
    if First="" quit
    read !,"Second Number: ",Second
    if Second="" quit
    DO RESULTS
    GOTO READ
    RESULTS ; display the results to screen
    write !?5,"Sum: ",First+Second
    write !?5,"Product: ",First*Second
    quit ; end of routine
    [/code]

    It works, but the GOTO command doesn't seem to work in my routine.
    I messed up somewhere! Thx!!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Duke@21:1/5 to ed de moel on Mon Oct 25 08:30:08 2021
    On Monday, October 25, 2021 at 9:09:19 a.m. UTC-6, ed de moel wrote:
    The rendition of white-space is always a problem on platforms like this, so it's hard to tell, but...
    In your example, all lines, except the ones with a label (READ and RESULTS), should start with a space.

    Thx Ed! And they do start with a space (except for the labels) - actually 4 or 5 spaces. Would the extra whitespace matter?

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