September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,42 @@
OPEN "/dev/stdin" FOR DEVICE AS in
FUNCTION get_odd()
LOCAL ch, letter
ch = MEMORY(1)
GETBYTE ch FROM in
IF NOT(REGEX(CHR$(PEEK(ch)), "[[:punct:]]")) THEN
letter = get_odd()
PRINT CHR$(PEEK(ch));
ELSE
letter = PEEK(ch)
END IF
FREE ch
RETURN letter
END FUNCTION
mem = MEMORY(1)
PRINT "Enter string: ";
WHILE TRUE
GETBYTE mem FROM in
PRINT CHR$(PEEK(mem));
IF REGEX(CHR$(PEEK(mem)), "[[:punct:]]") THEN
IF PEEK(mem) <> 46 THEN
POKE mem, get_odd()
PRINT CHR$(PEEK(mem));
END IF
IF PEEK(mem) = 46 THEN BREAK
END IF
WEND
FREE mem
CLOSE DEVICE in
PRINT