Warning
You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
input [2019/05/28 10:19] – neils | input [2019/09/20 07:51] (current) – neils | ||
---|---|---|---|
Line 3: | Line 3: | ||
Syntax: | Syntax: | ||
- | input <string pointer destination>, | + | input <string pointer destination>, |
| | ||
The '' | The '' | ||
Line 11: | Line 11: | ||
No prompt string (e. g. ''?'' | No prompt string (e. g. ''?'' | ||
+ | |||
+ | **Warning: | ||
Examples: | Examples: | ||
+ | rem -- initialize a buffer first | ||
+ | dim buff![21] | ||
+ | name$ = @buff! | ||
rem -- input any string, max 20 chars and store it to name$ | rem -- input any string, max 20 chars and store it to name$ | ||
input name$, 20 | input name$, 20 | ||
+ | | ||
rem -- input a numeric string, max 6 chars | rem -- input a numeric string, max 6 chars | ||
+ | rem -- assume a buffer has been initialized | ||
input num$, 6, " | input num$, 6, " | ||
+ | | ||
rem --input a string, allowing alphanumeric chars only | rem --input a string, allowing alphanumeric chars only | ||
+ | rem -- assume a buffer has been initialized | ||
input a$, 10, " | input a$, 10, " | ||