| Calling Sequence
| List(labelling,item1,item2,...)
|
| Return Type
| List |
| Selectors
| | Name | Type | Description |
|
| labelling
| {procedure,string} | labelling method |
| item_i
| {string,structure} | text or structure for each entry |
|
| Methods
| HTMLC, LaTeXC, print, string, type |
| Synopsis
| The List structure holds information which will be
formatted as a simple list.
The first argument is a procedure which should produce a string
for each integer argument.
This will be the label that is used for each entry in the list.
If the first argument is a string with a "%" in it, it is
interpreted as an argument for sprintf.
This is an easy way to provide arbitrary formating of numbers.
If it is a string, that string is used for all items in the list.
A list is normally part of a Document or some other structure
intended for display or human-readable purposes.
The following table shows some common labelling functions
and their results for a few integers: |
| | procedure | 1 | 2 | 10 | 20 | 30 |
|
| Roman | I | II | X | XX | XXX |
| Alphabetical | A | B | J | T | AD |
| x->lowercase(Roman(x)) | i | ii | x | xx | xxx |
| x->sprintf('(%s)',Alphabetical(x)) | (A) | (B) | (J) | (T) | (AD) |
| '(%d)' | (1) | (2) | (10) | (20) | (30) |
| 'o' | o | o | o | o | o |
|
| Examples
| > string( List('--%d--',First,Second));
--1-- First
--2-- Second
|
| See also
| Code, Color, Copyright, Document, HTML, HyperLink, Indent, LastUpdatedBy, latex, Paragraph, PostscriptFigure, print, Roman, RunDarwinSession, screenwidth, Table, TT, View |