]> Repositorios git - scryer-prolog.git/commit
~| now incorporates the number of characters described so far
authorMarkus Triska <[email protected]>
Tue, 9 Feb 2021 19:52:26 +0000 (20:52 +0100)
committerMarkus Triska <[email protected]>
Tue, 9 Feb 2021 19:55:46 +0000 (20:55 +0100)
commit1bdfc5a1a4e683ad5c86f2b0fa573887d7418bef
tree7774ca25ef9ec8ac77371924b3ac4773cceca401
parent195273f01d09b63d9655b9424b83b450fb24e6ae
~| now incorporates the number of characters described so far

Therefore, subsequent uses of ~N| now yield the specified column,
instead of potentially overshooting.

Example:

    ?- format("hello~|~t~8|!", []).
    hello   !   true.

Such cases are probably rather uncommon: Relative positioning with ~N+
is more likely to be used in such cases, and that worked as intended
also previously as it does now:

    ?- format("hello~|~t~3+!", []).
    hello   !   true.

In fact, if absolute positions are used, then ~| can be omitted entirely:

    ?- format("hello~t~8|!", []).
    hello   !   true.
src/lib/format.pl