Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
→{{header|N/t/roff}}
(→{{header|N/t/roff}}: Add output) |
|||
Line 2,585:
This program may output to paper (Postscript/PDF or actual printout) or a line-printer/terminal depending on the device specification.
This implementation is not reverse-compatible classical TROFF from Bell Labs, as TROFF then was extremely limited in what it could do. It will work with GNU Troff, though. The classical version of TROFF could only do recursive macro calls, which is integral to the functioning of <code>.AREADLN</code>, but not <code>.while</code> looping constructs, which is integral to the functioning of <code>.ASORT</code>; it could also only support numerical registers with name consisting of two characters maximum, so a register named <code>A9</code> would be okay (2 characters), but not <code>A123</code> (4 characters).
Block comments start with <code>.ig</code> and end with <code>..</code>. Single-line comments begin with <code>\"</code>
{{works with|GROFF (GNU Troff)|1.22.2}}
Line 2,607 ⟶ 2,609:
implementation is one-indexed (array elements count from 1), though it could be
hardcoded again to become zero-indexed depending on what the programmer favours.
..
.nr Ac 0 1 \" Array counter
|