# Input syntax

**URL:** <https://www.ruby-forum.com/t/input-syntax/88268>\
**Category:** Ruby\
**Created:** [March 9, 2007, 9:21am UTC](https://www.ruby-forum.com/t/input-syntax/88268 "2007-03-09T09:21:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 9:21am UTC](https://www.ruby-forum.com/t/input-syntax/88268/1 "2007-03-09T09:21:19Z")

</div>

I have tried this little program taken from [rubylearning.com](http://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

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/input-syntax/88268/2 "2007-03-09T17:51:08Z")

</div>

On 9 mar, 16:34, “ChrisH” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/input-syntax/88268/3 "2007-03-09T14:06:01Z")

</div>

On Mar 9, 3:16 am, “mosar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

Cheers  
Chris

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/input-syntax/88268/4 "2007-03-09T16:21:38Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/input-syntax/88268/5 "2007-03-09T16:35:40Z")

</div>

On Mar 9, 9:01 am, “mosar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![mosar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f6c823/32.png) [@mosar](https://www.ruby-forum.com/u/mosar)\
**Post date:** [March 9, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/input-syntax/88268/6 "2007-03-09T15:06:10Z")

</div>

On 9 mar, 14:02, “ChrisH” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
