lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It seems fine to disallow the '+' and ' ' flags for conversion
specifiers other than d, i, a, A, e, E, f, F, g, and G. If adding a
'+' or ' ' is intended it should put it before '%' ("+%c" instead of
"%+c").

The behavior with repeated flags is also not very well defined,
prohibiting them is probably fine.

On Tue, Aug 31, 2021 at 1:45 PM Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
> To define a behavior as undefined sounds like those "this page
> intentionally left blank" pages :-)
>
> In the particular case of 'printf', the format "%#c" is defined as
> undefined, while the format "%+c" is literally undefined. Should we
> consider "%+c" as undefined behavior(™)?
>
> -- Roberto