From: Captain Ishido Date: 2013-07-30T20:05:11+09:00 Subject: Re: How to check an input IS an integer ? Le 30/07/2013 12:19, Henry Maddocks a �crit : > > > Sent from my iPad > > On 30/07/2013, at 10:03 PM, Captain Ishido wrote: > >> >> print "Veuillez entrer un entier (1) : " >> reponse = readline.chomp >> > > Try... > > puts response.class > > That might tell you what the problem is. > > Henry Huuuuuuuuuum, I see. /readline/ says it's a string, whatever I'm typing. So, I think I have to analyse what my user types, and IF it's number, I cast it to Integer. Right ? -- Cordialement. +-------------------------------------------------+ | Ensemble, lib�rons Internet ! | +----------------+--------------------------------+ | Linux � Nantes | http://www.linux-nantes.org/ | +----------------+--------------------------------+ | Projet B�po | http://bepo.fr/ | +----------------+--------------------------------+ | Site perso | http://captain.ishido.free.fr | +----------------+--------------------------------+ | Message tap� en B�po sur un Typematrix 2030 USB | +-------------------------------------------------+