Edit history: 2004-07-20, Version 1 by Bruno Haible
Status: For CLiki consideration
- Problem Description:
- CLHS 18.104.22.168, paragraph 1 describes what the ~T format directive does. If colnum is less than the current column, colinc is positive, and (mod (- curcol colnum) colinc) is 0, then it is unclear if this directive causes any spaces to be printed (and similarly for the case in PPRINT-TAB). Existing implementations do print at least one space in this case.
- Proposal (FORMAT-TABULATE:AT-LEAST-ONE-SPACE):
- Rewrite the sentence as "If the cursor is already at or beyond column colnum, and colinc is positive, it will output spaces to move it to column colnum+k*colinc for the smallest positive integer k possible; at least one space is output in this case. If the cursor is already at or beyond column colnum, and colinc is zero, no spaces are output."
- Test case:
- (format t "~%abcdef~3,3T|xyz") or (format t "~%abcdef~6,3T|xyz")
- colinc = 0 is used when it is ok to output no spaces; therefore when colinc > 0, at least one space should be printed.
- Current practice:
- CLISP already implements proposal AT-LEAST-ONE-SPACE.
- Cost to Implementors:
- Cost to Users:
- Cost of Non-Adoption:
- Some output may be lacking a space when this was not intended by the programmer.
- Bruno Haible supports proposal AT-LEAST-ONE-SPACE.
This page is presently Uncategorized: please add appropriate topic markers and remove this text