• blind inpu

    From Mr. Spelunx@21:1/5 to All on Wed Sep 7 14:28:30 2022
    Hello. I'm new here. I have a question about a little procedure I'm developing in UCBLogo. I want the user to type a secret message word that gets output to another procedure/primitive. The characters are collected in a word STRING and don't appear on
    the screen. The recursion stops with an Enter key (ascii 10 in Windows, ascii 13 elsewhere). Here it is:

    TO INPUT :STRING
    LOCAL "K
    MAKE "K READCHAR
    IF EQUALP ASCII :K 10 [OUTPUT :STRING STOP]
    MAKE "STRING WORD :STRING :K
    INPUT :STRING
    END

    ? PRINT INPUT "
    (SWORDFISH) (not visible)

    You don't say what to do with SWORDFISH in INPUT
    [INPUT :STRING]


    I can't figure out why it won't output to PRINT. If I change the section OUTPUT :STRING to PRINT :STRING, it will print SWORDFISH.

    Strangely, this works in LogoWriter 2.0 for DOS and TurtleSpaces, but not Apple Logo or UCBLogo. Is this a word-terminator problem or something else?

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