diff options
author | Adriaan de Groot <groot@kde.org> | 2021-12-21 14:37:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-12-21 15:55:35 (GMT) |
commit | b3a249c2cb90dc462316e69ccb4a9c7b5ba14618 (patch) | |
tree | 65d0ba8080ca10458e29e24242c7ed6ae29325a4 /Help | |
parent | b6fdcb3df0bd8c9643caf694aecfbc13727f99ad (diff) | |
download | CMake-b3a249c2cb90dc462316e69ccb4a9c7b5ba14618.zip CMake-b3a249c2cb90dc462316e69ccb4a9c7b5ba14618.tar.gz CMake-b3a249c2cb90dc462316e69ccb4a9c7b5ba14618.tar.bz2 |
Help: clarify range for list(INSERT), mention nonexistent / empty case
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/list.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Help/command/list.rst b/Help/command/list.rst index bd8277d..621eeb4 100644 --- a/Help/command/list.rst +++ b/Help/command/list.rst @@ -152,7 +152,12 @@ For more information on regular expressions look under list(INSERT <list> <element_index> <element> [<element> ...]) -Inserts elements to the list to the specified index. +Inserts elements to the list to the specified index. It is an +error to specify an out-of-range index. Valid indexes are 0 to `N` +where `N` is the length of the list, inclusive. An empty list +has length 0. If no variable named ``<list>`` exists in the +current scope its value is treated as empty and the elements are +inserted in that empty list. .. _POP_BACK: |