Input syntax

M

mosar

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
 
C

ChrisH

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


In which city do you stay ?


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

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

Cheers
Chris
 
M

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
 
M

mitchell

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;
 
C

ChrisH

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
 
M

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

It functions exactly as you write. Many thanks
mosar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,237
Messages
2,571,189
Members
47,823
Latest member
eipamiri

Latest Threads

Top