Groups | Search | Server Info | Login | Register


Groups > comp.lang.logo > #139

blind inpu

Newsgroups comp.lang.logo
Date 2022-09-07 14:28 -0700
Message-ID <d2ffa366-2447-4f82-96eb-01d9daae337bn@googlegroups.com> (permalink)
Subject blind inpu
From "Mr. Spelunx" <mrspelunx@gmail.com>

Show all headers | View raw


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?

Back to comp.lang.logo | Previous | Next | Find similar


Thread

blind inpu "Mr. Spelunx" <mrspelunx@gmail.com> - 2022-09-07 14:28 -0700

csiph-web