From: Mike Ayers (firstname.lastname@example.org)
Date: Tue Dec 13 2005 - 14:17:15 CST
Addison Phillips wrote:
> Without knowing more specifics, it is difficult to advise you precisely.
> If you are trying to write general purpose code that can serve many
> languages, perhaps simultaneously, then avoiding the generation of long
> lists where possible might be a good idea. The more one fools around with
> count, gender, inter-word dependency and the like, the more likely one is
> to get it wrong somehow.
The problem is that I am dealing with a situation involving repeated
use of the terms "generalized" and "arbitrary". We have no control over
the existence or content of the lists, but we must display them as best
we can when they arrive. What I'm thinking now:
LIST_CONCAT - String which is inserted between consecutive,
non-terminal list items.
LIST_TERMCAT - String which is inserted between the second-last and
LIST_PAIRCAT - String which is inserted between the items in a two
Their descriptions should make the algorithm clear. Example:
LIST_CONCAT - ", "
LIST_TERMCAT - ", and "
LIST_PAIRCAT - " and "
["dog", "cat", "pig", "fish"] -> "dog, cat, pig, and fish"
LIST_CONCAT - ""
LIST_TERMCAT - "和"
LIST_PAIRCAT - "和"
["大狗", "猫猫", "猪", "鱼"] -> "大狗猫猫猪和鱼"
Would this be sufficient?
This archive was generated by hypermail 2.1.5 : Tue Dec 13 2005 - 14:40:54 CST