English | 简体中文 | Github | Gitee
- In
AutoHotkey
, the starting index of an array is1
. - To remain interval
[left,right)
,The selection range of an array is(1, Array's length + 1)
.Array's length + 1
is used to select the last element.- eg.
arr_slice(arr, start, end := arr.Length + 1)
arr_slice([11, 22, 33, 44, 55 ], 3, 5)
=>[33, 44]
arr_slice([11, 22, 33, 44, 55 ], 3)
=>[33, 44, 55]
arr_slice([11, 22, 33, 44, 55 ], 3, 6)
=>[33, 44, 55]
arr_slice([11, 22, 33, 44, 55 ], 1, -2)
=>[11, 22, 33]
- eg. type,value checks...
- Exists before compilation and is removed after compilation.(Compile by
Ahk2Exe.exe
)