Lyricdev
GitHub

LYR-MIG0208

a format spec without its old output

hint · spec 14-cli

A note of lyric fix --from-4: a format spec of Lyric 4 (.NET's) that Lyric 5's format language writes otherwise for some values (D, X on a signed integer), or not at all (E, P, C, G, R, a custom format).

Explanation

Lyric 4 passed a format spec to .NET; Lyric 5 has one format language of its own ([[fill]align][sign][#][0][width][grouping][.precision][type]). The migration writes what keeps the output: a width is an alignment ({name:10} is {name:<10}, {n:-8} is {n:>8}), N2 is ,.2f, F3 is .3f, and on an integer the decimals stand after the hole ({n:N2} is {n:,}.00).

Written and said as a proposal: D6 is written 06, which counts a negative value's sign in the width; X is written X, which writes a negative value's sign and magnitude where Lyric 4 wrote its two's complement.

Said by hand, left as written: scientific (E), percent (P), currency (C), general (G), round-trip (R) and custom formats such as 0.00 — Lyric 5 refuses them. The note proposes the nearest spec where there is one.

Example

by hand[LYR-MIG0208] main.lyr:5:15: the format 'P1' (percent) has no counterpart in Lyric 5's format language — ':.1%' writes the percent without the space