From: Bertram Scharpf Date: 2009-09-25T21:09:48+09:00 Subject: Re: How to ask for numerica input Hi, Am Freitag, 25. Sep 2009, 11:12:37 +0900 schrieb David A. Black: > On Fri, 25 Sep 2009, Fred Ige wrote: >> I am trying to make a simple temperature converter, and I want to ask >> for F temperature (numerical value) >> >> what command do I use? > > print "Enter a number: " > line = gets > num = line.to_i > > You can get fancier with error-checking, etc., but that's the basic > idea. This does the error checking: num = Integer line Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de