Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / input valid number?

Author
Message
iori
19
Years of Service
User Offline
Joined: 26th Jan 2005
Location:
Posted: 16th Feb 2005 16:46
Hello everyone,
i am fairly new to DarkBASIC and want to know how can i make sure that the user has input a valid number(integer/decimal)? can anyone help me out here.

Thanks
Digital Dragon
19
Years of Service
User Offline
Joined: 17th Dec 2004
Location: ...
Posted: 16th Feb 2005 22:05 Edited at: 16th Feb 2005 22:05
Try and have a look at my tutorial
http://forum.thegamecreators.com/?m=forum_view&t=48609&b=7
see if you can work it out from there

Mrnaughty is my name being NAUGHTY is my game. lol
iori
19
Years of Service
User Offline
Joined: 26th Jan 2005
Location:
Posted: 17th Feb 2005 00:21
thanks naughty for replying, i understand checking for one input key using inkey$ but what if somnone types in "2b" or "2.3" ? how will I check that?
iori
19
Years of Service
User Offline
Joined: 26th Jan 2005
Location:
Posted: 17th Feb 2005 00:25
here is what i am talking about:

http://forum.thegamecreators.com/?m=forum_view&t=39505&b=1

IanM has given a this snipped too:


but how can i use it , i tried :


but that doesnt work

Login to post a reply

Server time is: 2024-09-23 12:28:47
Your offset time is: 2024-09-23 12:28:47