Re: Should to_number return a sequence?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Yikes! That is a terrible implementation of a to_number() function*.

If you want all that other functionality, create proper functions for them. Then do,

if can_be_a_number(can_this_be_a_number_var) then 
  return to_number(can_this_be_a_number_var) 
else 
  return Null 
end if 

to_number() should return a number or Null (?) if it cannot convert the given object. O or maybe even crash?.

If you want to wrap it yourself, do something like, safe_to_number(can_this_be_a_number_var,X,Y,...).

*I could be wrong.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu