Re: Phix value() function

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

Thank you, I hadn't been aware of to_number()!

But while it would solve the "is this actually a valid number?" issue, I can't use it in Hypatia, because it doesn't accept &b… and &h… for binary and hex numbers (and I can't use #… for hex numbers, because PHP-inspired # begins comment lines, etc.) Also, I'm not that happy that to_number() allows/ignores underscore characters in a number (why?), which allows for some possible typo mishaps.

Btw, you say, This routine also allows eg "65'A'" which is treated as if it was just "65" — not that I understand what this is about, but when I try
? to_number("65'A'")
Phix crashes — which means, user input could crash the program, which is another thing I wouldn't be happy about — probably a bug that you will fix, but my main issue is still with &b… and &h…

But, if you promise I can keep using value(), I'm happy enough!

Robert

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

Search



Quick Links

User menu

Not signed in.

Misc Menu