Re: I'm New



From: David Stanislaus [mailto:stanislaus_d@xxxxxxxxxxx]
# puts 'Speak up Sonny I can\'t hear you.'
# talk = gets.chomp
# if talk == talk.capitalize or talk == talk.downcase
# then puts 'What? Sonny speak louder! Like THIS.'
# if talk == talk.upcase
# then puts 'no not since'
# end
# end
# and used Caps it just ended the program... sorry if this is
# too trivial,
# if it is maybe you guys could recommend a place where I wont be a
# bother,

we are glad that you are doing your best.

your if is structured like this,

if talk == talk.capitalize or talk == talk.downcase
puts 'What? Sonny speak louder! Like THIS.'

if talk == talk.upcase
puts 'no not since'
end
end

wc means that the 2nd if is nested inside the first if, ergo it does not get called if you entered all caps.

another tip: use indentions (wisely)

kind regards -botp


Relevant Pages

  • Re: Im New
    ... then puts 'What? ... Sonny speak louder! ... if it is maybe you guys could recommend a place where I wont be a ...
    (comp.lang.ruby)
  • Re: file grep
    ... puts line if names.includes? ... Kind regards ... The more compact version does not properly close the file. ... my version will close the file regardless how the block is left (i.e. even in case of an exception) while the fixed compact version does not close the file if the block is left via an exception. ...
    (comp.lang.ruby)
  • Re: Please clarify European resistor value notation for me
    ... Click - POOF. ... schematic), the netlists wouldn't match. ... I don't 'get' the funny US caps with curly plates though. ...
    (sci.electronics.design)
  • Re: deaf grandma.
    ... puts "Simon says, ... and check the flag each time to see whether we loop again. ... puts "that was in all caps" ...
    (comp.lang.ruby)
  • Re: Eval and block problems
    ... > puts "preparation" ...
    (comp.lang.ruby)