Re: Documentation and output of pretty_print()

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

Pete Lomax wrote:

> On Sun, 05 Sep 2004 13:40:56 +0200, Juergen Luethje <j.lue at gmx.de>
> wrote:
>
>> Hi Rob and all,
>>
>> I accidently discoverd something concerning pretty_print(),
>  You were using pretty_print? You TRAITOR! blink)

You've got me there. :o)

>> that is ALSO shown by the following code snippet:
>>
> }}}
<eucode>
> include ppp.e
> atom a
>
> ppOpt({pp_IntFmt,"#%x ('integer')"})
> ppOpt({pp_FltFmt,"#%x ('floating-point number')"})
>
> a = power(2,30) - 1     -- 30 bit
> pp(a)
> a = power(2,30)         -- 31 bit
> pp(a)
> </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 didn't realise ppp.e would do this as well, I'll mention it
> somewhere, thanks

I think it's especially useful for expressions such as "#%x", "%.2f EUR",
"%.10g km".

>> 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?
> Ditto, I just use integer(), I suppose that could be changed (but not
> right now).

Right now is not necessary, tomorrow will be OK. :o)

Regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |  Money is the root of all evil.
 \ /  against HTML in       |  Send 20 Dollars for more info.
  X   e-mail and news,      |
 / \  and unneeded MIME     |  http://home.arcor.de/luethje/prog/

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

Search



Quick Links

User menu

Not signed in.

Misc Menu