Proposal: [101] Right-justified text output

Retired

This proposal has been moved into this section. Its former address was: /standard/core/Dotq

This page is dedicated to discussing this specific proposal

ContributeContributions

mcondronavatar of mcondron [101] Right-justified text outputProposal2019-08-01 22:07:03

It would be nice to have something following the basic idea of .R and D.R for string output. Maybe it could be called ."R or .R"

AntonErtlavatar of AntonErtl

: rtype ( c-addr u u2 -- )
\ print string represented by c-addr u right-justified in a u2-wide field
  over - 0 max spaces type ;

This prints the full string if it is too wide; adjust as necessary if you want to truncate it in some way.

mcondronavatar of mcondron

Thanks for the example! I am proposing that something like that be added to the standard. Since there are right-justified output words for numbers, why not also have it for text?

StephenPelcavatar of StephenPelc

Committee response

This was discussed at the standards meeting. Our conclusions are

We can't vote on this until it is a proper proposal, which should include common practice

The committee felt that the proposal is unlikely to pass

The code is simple to implement, and is more of a "Wouldn't It Be Nice If" than satisfying a real need.

Stephen Pelc

AntonErtlavatar of AntonErtl

The committee asked me to retire this proposal, because the proponent has apparently abandoned it.

Retired
Reply New Version