Re: Documentation and output of pretty_print()
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 05, 2004
- 491 views
Juergen Luethje wrote: > I accidently discoverd something concerning pretty_print(), that is > shown by the following code snippet: > > }}} <eucode> > include misc.e > atom a > > a = power(2,30) - 1 -- 30 bit > pretty_print(1, a, {0,3,1,78,"#%x ('integer')", "#%x ('floating-point > number')"}) > a = power(2,30) -- 31 bit > pretty_print(1, a, {0,3,1,78,"#%x ('integer')", "#%x ('floating-point > number')"}) > </eucode> {{{ > > a) Options #5 and #6 can not only take format strings, but those strings > can contain additional text, like in printf(). Very nice! This should > be documented, I certainly had used it before, if I had known it. I'll mention that in the docs. Thanks. > b) Integer values > 30 bit seem to be treated as floating-point numbers. > This is somehow confusing for me. Can this be changed without > drawbacks? I simply test for integer(). I don't want set up a third category for integer values in the 32-bit range. pretty_print() will never do everything that everyone wants. Feel free to modify it. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com