Inputting a string, from m/c

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Inputting a string, from m/c

Post by uglifruit »

Is there a handy guide to how I'd use the rom routines (probably) to get the user to Input a string of text from m/c. I currently am reading keyboard, and storing that ... But it seems a bit silly to be writing my own "delete" routine, and routine so that the user can enter Extended mode characters ... When INPUT A$ is already handling all of that.
CLEAR 23855
User avatar
Joefish
Rick Dangerous
Posts: 2059
Joined: Tue Nov 14, 2017 10:26 am

Re: Inputting a string, from m/c

Post by Joefish »

Depends if you want it to look good, or a bit cheap!
Do you really need all those extra characters?
As then you risk someone trying to type a keyword instead of a single character...
User avatar
Einar Saukas
Bugaboo
Posts: 3141
Joined: Wed Nov 15, 2017 2:48 pm

Re: Inputting a string, from m/c

Post by Einar Saukas »

Instead of writing your own routine, you can simply use SUPER INPUT:

https://spectrumcomputing.co.uk/index.p ... oup_id=459

There are 2 variants available. Give it a try, to see which one you prefer.
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Inputting a string, from m/c

Post by uglifruit »

I'm fine with it looking a bit cheap, and risking keywords. It's for my proportional printing font designer, just wanted the user to be able to choose a string to preview the typeface with.
CLEAR 23855
User avatar
uglifruit
Manic Miner
Posts: 703
Joined: Thu Jan 17, 2019 12:41 pm
Location: Leicester
Contact:

Re: Inputting a string, from m/c

Post by uglifruit »

Einar Saukas wrote: Fri Jan 24, 2020 4:55 pm Instead of writing your own routine, you can simply use SUPER INPUT:

https://spectrumcomputing.co.uk/index.p ... oup_id=459

There are 2 variants available. Give it a try, to see which one you prefer.
Ooh, I'll have a look. Thanks.
CLEAR 23855
Post Reply