Page 1 of 1

Leading spaces INPUT

Posted: Fri 26 Apr 2019, 21:16
by Ric
Evening all,
I have a simple question,

Is it possible to create a string using INPUT where the leading spaces are accepted as characters?
Currently my code is similar to this

INPUT"Text ";a$
PRINT a$
IF text inputted is " test"
the result is
"test"
The result i want in a$ is " test"

Can anyone help

Regards Ric

Re: Leading spaces INPUT

Posted: Fri 26 Apr 2019, 23:57
by Zaphod
It looks like the FNinput in the NOWAIT library will do that for you.

Z

Re: Leading spaces INPUT

Posted: Sat 27 Apr 2019, 11:02
by Ric
Perfect.
Thanks Z
Ric

Re: Leading spaces INPUT

Posted: Mon 29 Apr 2019, 14:38
by DDRM
An alternative would be to use INPUT LINE? From the manual: "The item input is taken as is, including commas, quotes and leading spaces. "

Best wishes,

D