Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
A bit of help
Acoole Cooland
5/18/2007 3:47:00 PM
Ok say i was using this code using SciTE
puts 'Hello there, and what\'s your name?'
name = gets
puts 'Your name is ' + name + '? What a lovely name!'
puts 'Pleased to meet you, ' + name + '. :)'
After i input my name in the gets, and press enter it just skips the
rest of the program and closes it!
Whats wrong?
Thanks,
--
Posted via
http://www.ruby-...
.
2 Answers
Harry Kakueki
5/18/2007 3:57:00 PM
0
On 5/19/07, Acoole Cooland <andrewchinna@yahoo.co.uk> wrote:
> Ok say i was using this code using SciTE
>
> puts 'Hello there, and what\'s your name?'
> name = gets
> puts 'Your name is ' + name + '? What a lovely name!'
> puts 'Pleased to meet you, ' + name + '. :)'
>
> After i input my name in the gets, and press enter it just skips the
> rest of the program and closes it!
>
> Whats wrong?
>
> Thanks,
>
Hi,
I don't use SciTE, but it is probably running so fast you do not see
it and then closes.
Try this.
puts 'Hello there, and what\'s your name?'
name = gets
puts 'Your name is ' + name + '? What a lovely name!'
puts 'Pleased to meet you, ' + name + '. :)'
gets
Just put the 'gets' at the end.
That will make the program wait for you to enter something.
Harry
--
A Look into Japanese Ruby List in English
http://www.ka...
Acoole Cooland
5/18/2007 4:02:00 PM
0
Oh my god!, it worked Thank you guys so much. Ruby-Forum rules!
Thanks,
-Acoole
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
A bit of help
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password