nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] <Happy Dance!>

2017-08-16 16:00:10
We don't mention that negative values left-pad.

It's mentioned in the next paragraph, but it says that only happens
when when use %(putstrf).  That's true ... but there is a subtle
complication.  A lot of format escapes include an implied STRF
instruction which is really where the left padding happens.

But ... it's not even that simple.  Function escapes which take a component
will generate the FT_COMPF instruction, which does handle the left-padding.
Function escapes that take OTHER function escapes as arguments AND are
given a function that returns a string will handle left-padding; if it's
a function that returns a number, then it will not.

There's also a FT_LITF instruction that is implemented, but never used
as far as I can tell.  Which is good because it doesn't handle left-padding
either!

So the result of all that is a number of things handle left-padding, but not
everything.  Explaining that will be a challenge.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>