[Nickle] Bugs with new output formatting

Keith Packard keithp at keithp.com
Wed Oct 17 22:41:44 PDT 2007


On Wed, 2007-10-17 at 16:15 -0700, Barton C Massey wrote:
> Unfortunately, the new output formatting seems to have some
> problems...
> 
> 
>   > 1/(2**64-1)

Do you have something in your .nicklerc file? This works for me

>   > 1/3
>   0.3

As does this.

> In general it appears that the curly braces are simply
> omitted, without expanding the value in any reasonable way.
> This seems to be the case even if "infinite precision" is
> specified---I can't find any way to get the curly braces
> *back*.

format="%G" does this trick.
   
> It's never been obvious to me why the first format command
> is acceptable, but the second is not :-).

Yeah, we need some consistent documented behaviour for the various
format flags.

> I'm not sure what to do about all this.  I think the user
> should be able to select between a "%f"-like or "%g"-like
> output format and the old format with the curly braces for
> repeats using the format variable.  I also think that Nickle
> should accept curly-repeats on the input, although I know
> that's a pain in the neck.

Uh, this works for both the lexer and scanf...

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/nickle/attachments/20071017/c9dbc39d/attachment.pgp 


More information about the Nickle mailing list