summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-01-02 15:56:08 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-01-02 15:56:08 (GMT)
commitc8b8e0c702da83bc36d63c89e598cdb97816352d (patch)
tree1c53ae3e468446ba88a5919cd25f089c85b07efb /Source/cmListCommand.h
parent603cd2ab6a1d840943193e626dd992203a46e6ba (diff)
downloadCMake-c8b8e0c702da83bc36d63c89e598cdb97816352d.zip
CMake-c8b8e0c702da83bc36d63c89e598cdb97816352d.tar.gz
CMake-c8b8e0c702da83bc36d63c89e598cdb97816352d.tar.bz2
BUG: fix for bug 6207 explain list index values better
Diffstat (limited to 'Source/cmListCommand.h')
-rw-r--r--Source/cmListCommand.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h
index ff5ebc8..b5193b5 100644
--- a/Source/cmListCommand.h
+++ b/Source/cmListCommand.h
@@ -80,18 +80,23 @@ public:
"FIND will return the index of the element specified in the list or -1 "
"if it wasn't found.\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 "
"difference is that REMOVE_ITEM will remove the given items, while "
"REMOVE_AT will remove the items at the given indices.\n"
"REVERSE reverses the contents of the list in-place.\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, "
"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 "
- "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"
;
}