Input syntax

I have tried this little program taken from rubylearning.com site:

puts “In which city do you stay ?”

city= gets.chomp
puts "The city is " + city

At the right part of the Scite window I get

ruby Dhomp.rb
In which city do you stay ?
Exit code: -1073741510

I get another window which should be the so-called output window
(black) in which I should be able to write the name of the city. But I
can’t write in. The window’s name is:C:\ruby\bin\ruby.exe. I suppose
that this is not the correct one.
Thanks for your help.

mosar

On 9 mar, 16:34, “ChrisH” [email protected] wrote:

puts “In which city do you stay ?”

Exit code: -1073741510
cmd shell.
Just gave it a try, and the trick is to type in your response in the
SciTe
output window (not in the separate cmd window that gets opened), under
where
it shows the ruby command. You won’t see the prompt message until
after
you enter the response

cheers
Chris

It functions exactly as you write. Many thanks
mosar

On Mar 9, 3:16 am, “mosar” [email protected] wrote:

mosar
This kind of interaction doesn’t work in SciTe, try running it from a
cmd shell.

Cheers
Chris

Hi,

Thank you but according to the above-mentioned Site :
“In the above example when you run it in SciTE, click on the output
window and then type the name of your city.” so one should be able to
run an input function in Scite. How shall I proceed ?

SciTE wasn’t designed for this. It was originally designed to accept CVS
query inputs.

Take care,
-Mitchell;

On Mar 9, 9:01 am, “mosar” [email protected] wrote:

city= gets.chomp
I get another window which should be the so-called output window
Cheers
Chris

Thank you but according to the above-mentioned Site :
“In the above example when you run it in SciTE, click on the output
window and then type the name of your city.” so one should be able to
run an input function in Scite. How shall I proceed ?
mosar

Just gave it a try, and the trick is to type in your response in the
SciTe
output window (not in the separate cmd window that gets opened), under
where
it shows the ruby command. You won’t see the prompt message until
after
you enter the response

cheers
Chris

On 9 mar, 14:02, “ChrisH” [email protected] wrote:

can’t write in. The window’s name is:C:\ruby\bin\ruby.exe. I suppose
that this is not the correct one.
Thanks for your help.

mosar

This kind of interaction doesn’t work in SciTe, try running it from a
cmd shell.

Cheers
Chris

Thank you but according to the above-mentioned Site :
“In the above example when you run it in SciTE, click on the output
window and then type the name of your city.” so one should be able to
run an input function in Scite. How shall I proceed ?
mosar

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs