Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: A bit of help
Jeremy Wilson
5/18/2007 3:54:00 PM
Here is a little chunk of code that may help you
puts 'I am a fortune-teller. Tell me your first name:'
fname = gets.chomp
puts 'What is your last name.'
lname = gets.chomp
puts 'Hello, '+ fname + ' '+ lname + '. ''Your name is a great one!'
-----Original Message-----
From: Acoole Cooland [mailto:andrewchinna@yahoo.co.uk]
Sent: Friday, May 18, 2007 11:47 AM
To: ruby-talk ML
Subject: A bit of help
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-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: 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