Page 1 of 1
COCO3 - text does not wrap while entering a long string with INPUT command
Posted: Mon Feb 03, 2025 6:48 pm
by jjarrell
When using INPUT, the typed text does not go wrap to the next line after reaching the end of the screen. However, it will still store the text you type in.
Code: Select all
CLS
INPUT "IF YOUR TEXT IS LONG IT WILL NOT WRAP",text$
PRINT text$
WAIT KEY RELEASE
Re: COCO3 - text does not wrap while entering a long string with INPUT command
Posted: Tue Feb 04, 2025 1:16 pm
by spotlessmind1975
Hi
jjarrell, and
thank you for your kind bug report!
jjarrell wrote: ↑Mon Feb 03, 2025 6:48 pm
When using INPUT, the typed text does not go wrap to the next line after reaching the end of the screen. However, it will still store the text you type in.
In fact this is the expected behavior, or, better, it is a behavior derived from the fact that the input via
INPUT or
LINE INPUT do not have screen management, nor line oriented editing. I think it is something that could be useful, but I would like to take inspiration from something that exists, so as not to invent yet another variant. Could you be so kind as to send me a specification or a behavior that you would expect the system to have, if implemented well?
Thank you!
Re: COCO3 - text does not wrap while entering a long string with INPUT command
Posted: Tue Feb 04, 2025 4:12 pm
by jjarrell
Thanks for the clarification and entertaining the idea of creating a variant. It's no problem working around the current behavior. I can just PRINT the text and put the INPUT on the next line and hope they are not wordy players.
I base my INPUT behavior on the way the Color Computer BASIC handled it. As you input your text, it would wrap around the screen. The only form of editing before you hit ENTER was by backspacing and deleting characters along the way.
My game scenarios where I could use this: Character descriptions like the one below or a program for the game author to open and change game data files such as room and item descriptions.
The idea is to use game files to read in the data as needed instead of storing it all in DATA statements.
Here's an example of a one-liner program and what it looks like when you run it on a Color Computer emulator.
10 INPUT"DESCRIBE YOUR CHARACTER
";
RUN
DESCRIBE YOUR CHARACTER? A TALL
IMPOSING FIGURE WHO LIKES TO WEA
R THE LATEST STYLES OF CHAIN MAI
L.