[#138] Thread Problems — Reimer Behrends <behrends@...>

I have been looking at the thread implementation of Ruby for the past

21 messages 1998/12/23
[#164] Re: Thread Problems — matz@... (Yukihiro Matsumoto) 1999/01/05

Hi.

[#167] Makefiles and -lcurses — Klaus.Schilling@... 1999/01/05

Julian Fondren writes:

[#168] Re: Makefiles and -lcurses — Julian Fondren <julian@...> 1999/01/05

OpenBSD has ncurses and it's own ocurses, and I prefer the latter.

[ruby-talk:00115] STDIN integer assignment

From: Julian Fondren <julian@...>
Date: 1998-12-17 04:58:44 UTC
List: ruby-talk #115
Hello,

in the following script, how would I be able to have the input along the
lines of ``10 100 <ENTER>'' assign ans1 to 10 and ans2 to 100?


#!/usr/bin/env ruby
print "Input two numbers to multiply together: "
ans1, ans2 = STDIN.gets.to_i, STDIN.gets.to_i
print "\n#{ans1*ans2}\n"



currently to get an answer something along the lines of ``10 <ENTER> 100
<ENTER>'' must be used.


thanks,



In This Thread