BUG: fix for bug 6207 explain list index values better

This commit is contained in:
Bill Hoffman 2008-01-02 10:56:08 -05:00
parent 603cd2ab6a
commit c8b8e0c702
1 changed files with 9 additions and 4 deletions

View File

@ -80,18 +80,23 @@ public:
"FIND will return the index of the element specified in the list or -1 " "FIND will return the index of the element specified in the list or -1 "
"if it wasn't found.\n" "if it wasn't found.\n"
"INSERT will insert elements to the list to the specified location.\n" "INSERT will insert elements to the list to the specified location.\n"
"When specifying an index, negative value corresponds to index from the"
" end of the list.\n"
"REMOVE_AT and REMOVE_ITEM will remove items from the list. The " "REMOVE_AT and REMOVE_ITEM will remove items from the list. The "
"difference is that REMOVE_ITEM will remove the given items, while " "difference is that REMOVE_ITEM will remove the given items, while "
"REMOVE_AT will remove the items at the given indices.\n" "REMOVE_AT will remove the items at the given indices.\n"
"REVERSE reverses the contents of the list in-place.\n" "REVERSE reverses the contents of the list in-place.\n"
"SORT sorts the list in-place alphabetically.\n" "SORT sorts the list in-place alphabetically.\n"
"NOTE: A list in cmake is a ; separated group of strings. " "NOTES: A list in cmake is a ; separated group of strings. "
"To create a list the set command can be used. For example, " "To create a list the set command can be used. For example, "
"set(var a b c d e) creates a list with a;b;c;d;e, and " "set(var a b c d e) creates a list with a;b;c;d;e, and "
"set(var \"a b c d e\") creates a string or a list with one " "set(var \"a b c d e\") creates a string or a list with one "
"item in it." "item in it.\n"
"When specifying index values, if <element index> is 0 or"
" greater, it is indexed from the "
"beginning of the list, with 0 representing the first list element. "
"If <element index> is -1 or lesser, it is indexed from the end of "
"the list, with -1 representing the last list element. Be careful "
"when counting with negative indices: they do not start from 0. "
"-0 is equivalent to 0, the first list element.\n"
; ;
} }