Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Putting user input into commands "colourback()cls" and "delay()"?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vdemons




PostPosted: Sat Apr 30, 2011 6:46 pm   Post subject: Putting user input into commands "colourback()cls" and "delay()"?

What is it you are trying to achieve?
I am trying to put user input into commands "colourback()cls" and "delay()"


What is the problem you are having?
When ever i run it it says "Argument is wrong type", can a variable be placed in
the parameter, such as colourback(variable)cls or delay(variable)
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Apr 30, 2011 7:15 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

Yes, but it has to be the right type (integer value).
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
vdemons




PostPosted: Sat Apr 30, 2011 7:39 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

but can't colourback(variable)cls be string or interger?
vdemons




PostPosted: Sat Apr 30, 2011 7:42 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

and i also want to do this with delay

var turingdelay:real:=1000

put "Please enter your disired time delay: "..
get inputdelay

turingdelay:=inputdelay*1000

. . .

delay (turingdelay)
Tony




PostPosted: Sat Apr 30, 2011 7:56 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

It doesn't really make any sense to have
code:

delay("hello, string")

You need an integer.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
vdemons




PostPosted: Sat Apr 30, 2011 8:00 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

but its a variable representing a number, so theory it should work right?
vdemons




PostPosted: Sat Apr 30, 2011 8:03 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

okay, i get it now but what about colourback(variable)cls does it have to be an integer as well, because that command accepts numbers and strings right?
Raknarg




PostPosted: Sat Apr 30, 2011 8:04 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

Nope, only integers. And only 0 - 255, btw.
Sponsor
Sponsor
Sponsor
sponsor
vdemons




PostPosted: Sat Apr 30, 2011 8:06 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

thanks i understand now! BTW i like ur Momo pic
Raknarg




PostPosted: Sat Apr 30, 2011 8:08 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

Razz Thanks. First one to get it. It's from Nightmares and Daydreams, for the record ;P
vdemons




PostPosted: Sat Apr 30, 2011 8:13 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

Nightmares and Daydreams, what is that?
Raknarg




PostPosted: Sat Apr 30, 2011 8:16 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

4 days before the Day of Black Sun, Aang has a bunch of nightmares. Appa and Momo have an awsome swordfight XD
[accent="indian"]
"Chakras! Chakras! Everybody loves Chakras!
Chackra sandwich good. Yum!"
[/accent]
Tony




PostPosted: Sat Apr 30, 2011 8:19 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

P.S. there are also round, strint that will make things work. Turing will require you to do type conversions yourself.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
vdemons




PostPosted: Sat Apr 30, 2011 8:19 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

must have missed the episode, was a great series, you their making a new avatar series "the legend of korra" it is a short of 7 or so episodes.
vdemons




PostPosted: Sat Apr 30, 2011 8:20 pm   Post subject: RE:Putting user input into commands "colourback()cls" and "delay()"?

thank you tony
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: