Re: pretty_print bug
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 26, 2004
- 475 views
Brian Broker wrote: > oh, and I forgot to ask... why not? I haven't studied the code in-depth for > myself but Al has already made suggestions. So why not take them? Too close > to release time to accidentally break something? I think Pete Lomax's solution makes sense for your situation. It requires no changes to pretty_print(). pretty_print() lets you choose a format for numbers that are in the Euphoria integer() range, and another format for all other numbers. I don't want to add a third range, i.e. numbers that are integer-valued but are just outside Euphoria's 31-bit integers. And I don't want Al Getz's solution. It would choose a different format for any huge floating-point number that just happened to be a mathematical integer. Few people would want their printouts of large floating-point numbers to occasionally and unexpectedly flip into a different format. It's not my intention to make pretty_print() do all things for all people. I'm just trying to cover simple, common cases, and I'm trying to keep the documentation and the code reasonably short and understandable. If you want to add a bell or whistle to pretty_print(), you can copy it and edit it to your heart's content. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com