Liberty BASIC Community Forum
« keyboard input fixing in a custom range ? »

Welcome Guest. Please Login or Register.
May 28th, 2017, 10:53pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: keyboard input fixing in a custom range ?  (Read 121 times)
Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 114
xx keyboard input fixing in a custom range ?
« Thread started on: Sep 13th, 2016, 12:11pm »

Hello again ,

if you want the user to make a input only in the custom

range of 1 till 1000 and otherwise redirect to the input

again ?

How to arrange that ?

code :

input "Give me a number";number

only 1 till 1000 is allowed.

nothing else. No strings or other keystrokes.

In the case of other keystrokes or out of range 1-1000

the user is promt to make the input again.


Zabo
User IP Logged

Zabo
Full Member
ImageImageImage


member is offline

Avatar

Yes. It work's. ha


PM

Gender: Male
Posts: 114
xx Re: keyboard input fixing in a custom range ?
« Reply #1 on: Sep 13th, 2016, 3:10pm »

[here]
print "Give an integer !"
input a
if a <>int( a) or a >1000 or a <1 then [here]

This code from tenochtitlanuk works.
« Last Edit: Sep 13th, 2016, 3:13pm by Zabo » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls