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 Question

Author
Message
Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 9th Sep 2006 21:03
I'm not sure how i can assign a word typed by someone who is using the program into a string variable?

Cocacola and Pepsi aren't that differnt. Deal with it.
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 9th Sep 2006 21:06
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 9th Sep 2006 21:22


Couldnt resist that...

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Sep 2006 22:10
Accel that wasn't very nice... Anyway that won't work if I type this: YeS So, try adding this after INPUT: YN$=Lower$(YN$)

C'mon! You should know better







P.S. lol.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 9th Sep 2006 22:14
Quote: "C'mon! You should know better"


woops,there goes my reputation

na,i just forgot that one...i typed it quick as simple example.

Quote: "Accel that wasn't very nice... "


My day wasnt alot better...

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Sep 2006 23:27
Oh. Long as you didn't work for hours on that that's fine then.

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Sep 2006 01:58
Atleast Gamedesign er20 did not use the word "input" in his question. I have seen that done before.

Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 10th Sep 2006 02:29
Thanks for the help, what i meant when i asked that question was say i want to delete an object that is identified as 1. i wanted the user of the program to have to type 1 in order to delete that. I figured i should, like you guys said, use the input command, and i was hoping i could associate the input command with a string, such as delete object blue$ and then somehow use the input command to make blue$ equal what was typed in.

Cocacola and Pepsi aren't that differnt. Deal with it.
CodemanV
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: South Wales Valleys, UK
Posted: 10th Sep 2006 09:56
Hello

Use the <Val(string)> command to convert a string to a number
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 10th Sep 2006 12:25
Quote: "Oh. Long as you didn't work for hours on that that's fine then."


im a Text coer for christ sake...im better in coding with text then in 3D or 2D

so that took me like,30 seconds to type out.then i had to check out some spelling errors...

Gamedesign er20
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: The one place you would never look...
Posted: 10th Sep 2006 19:01
@CodemanV
Thanks for the help, it was useful
Now i'm on to working with strings for a file, like copy file blue$, hopefully i will be able to convert your code into what i am looking for, altough it seems that the input command isn't working very well. I thought this might have worked


Cocacola and Pepsi aren't that differnt. Deal with it.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 10th Sep 2006 19:50 Edited at: 10th Sep 2006 19:51
Okay, here's the problem: When you say INPUT with that Blue$ at the end, it will put whatever the user writes into the variable called blue$. When you say
Blue$=Filename$,
you are making Blue$ equal Filename$, and since Filename$ has nothing in it you are making Blue$=nothing. the result is that you are left with 2 empty variables. Writing FileName$=Blue$ instead of Blue$=FileName$ would probably fix it, because you are putting the contents of Blue$ (what the user wrote) into FileName$.

Login to post a reply

Server time is: 2024-11-26 11:27:02
Your offset time is: 2024-11-26 11:27:02