\ tt 11-18-93 edited \ Output Formatting decimal : >type (s adr len -- ) tuck pad swap cmove pad swap type ; variable lmargin 0 lmargin ! variable rmargin 79 rmargin ! : ?line (s n -- ) #out @ + rmargin @ > if cr lmargin @ spaces then ; : ?cr (s -- ) 0 ?line ; \ : ??cr (s -- ) #out @ if cr then ; : to-column (s column -- ) #out @ - 1 max spaces ; variable tabstops 8 tabstops ! : ?to-column ( str-len start-column) tuck + rmargin @ > if drop cr lmargin @ spaces else #out @ - spaces then ; : .tab ( str-len) rmargin @ tabstops @ + lmargin @ do i #out @ >= if i leave then tabstops @ +loop ( str-len target-column ) ?to-column ;