# File die.rb, line 128 def typecast(x) dts = DataTypes.new x = '' if not x # if nil, then empty string if valid?(x) if @datatype if dts.typecasts.has_key?(@datatype) return dts.typecasts[@datatype].call(x) end end end return x end