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.

DarkBASIC Discussion / Input Problems

Author
Message
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 2nd Sep 2006 19:47
ok, im using a bit of code that lets the user input some info (numbers), but no matter what i have the variable as, it wont work



if i entered 500, it would still only return 0, if i try writing the string to a file nothing is added, only a carrage return. I've tried various variable types .. help ne1?
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Sep 2006 01:59
You do realize that input can take an integer variable... so this would work.


Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 3rd Sep 2006 21:53
It is indeed easier to store it in an integer variable.

If you're still interested:

DBC doesn't allow to store input directly into an array. You'll have to make a workaround, using something like


It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Xenocythe
20
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Sep 2006 21:59
Sven you aren't on MSN

oh, Sven beat me to it, so no code from me.


Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 4th Sep 2006 15:25
Thanx Guys! I had no idea you couldnt input directly into an Array. Learn sumit Everyday.

Login to post a reply

Server time is: 2025-05-26 03:34:44
Your offset time is: 2025-05-26 03:34:44