From: Artur Merke Date: 2003-11-17T10:23:15+09:00 Subject: to_i Hi, taken from the ruby book: str.to_i -> anInteger Returns the result of interpreting leading characters in str as a decimal integer. Extraneous characters past the end of a valid number are ignored. If there is not a valid number at the start of str, 0 is returned. The method never raises an exception. example "hello".to_i � 0 Is there a way to recognize if the conversion was successful? If "0".to_i and "any string".to_i deliver the same result, I don't see how this could be accomplished, without separately checking the syntax of the given string. Why doesn't "hello".to_i deliver a nil as a return value, which can clearly be recognized as a conversion failure? Artur _______________________________________________________________________________ Artur Merke ||| artur.merke@udo.edu (O-O) _____________________________________________.oo0--(_)--0oo.___________________