Re: Gets and chomp method question



Justin Collins wrote:
paul.denlinger@xxxxxxxxx wrote:
I'm working through the "Gets and chomp method" section of Learn to
Program on http://pine.fm/LearnToProgram/?Chapter=04

I have a problem. I have entered the strings:
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 + '. :)'
into the text editor, and when I run it, it of course runs up to the
second line. At this stage, I'm supposed to get a question, "What's
your name?" and respond by typing in my name.

When I run it, the command box opens, and just stays there. I have
tried typing my name in there, but nothing happens, and I cannot get
the code to continue running.

Where am I supposed to type in my name, and what am I supposed to type
to get the code running through the remaining lines of code?

Thank you.

Where are you running the program from? Inside some IDE? From the command line? In Windows?

-Justin

Nevermind, I see you are running Scintilla and I don't know anything about that! :)

-Justin


.



Relevant Pages

  • Re: Gets and chomp method question
    ... I have entered the strings: ... puts 'Hello there, and what\'s your name?' ... and respond by typing in my name. ... You ought to be running it from the command-line interpreter. ...
    (comp.lang.ruby)
  • Re: Gets and chomp method question
    ... I have entered the strings: ... puts 'Hello there, and what\'s your name?' ... and respond by typing in my name. ... When I run it, the command box opens, and just stays there. ...
    (comp.lang.ruby)
  • Gets and chomp method question
    ... I have entered the strings: ... puts 'Hello there, and what\'s your name?' ... and respond by typing in my name. ... to get the code running through the remaining lines of code? ...
    (comp.lang.ruby)
  • Re: Serial Commands
    ... stop-bit | stop-bit ... I was trying to send some strings through the Serial ... I wanted to know if there is a command to remove that, ... > puts $serial A ...
    (comp.lang.tcl)
  • Re: Help: How to remove blank between 7Fx delimiters using SED
    ... delimiter character will work to delete previous character. ... Maybe you're thinking of typing on the command line? ... magical in strings, but it might have effects on the command line when ...
    (comp.unix.shell)