Darwin Help

Back to Index

List

Class List - holds contents of a List of displayable items

Calling Sequence  List(labelling,item1,item2,...)
Return Type  List
Selectors
NameTypeDescription

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:

procedure12102030

RomanIIIXXXXXX
AlphabeticalABJTAD
x->lowercase(Roman(x))iiixxxxxx
x->sprintf('(%s)',Alphabetical(x))(A)(B)(J)(T)(AD)
'(%d)'(1)(2)(10)(20)(30)
'o'ooooo
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