PB 常用函数与封装函数列表(四、数组相关)
四、数组相关
string ls_arr[]
4.1 upperbound 函数
获取数组长度
语法
upperbound(array)
参数
array–>数组名 ls_arr
返回值
long
成功返回:array数组长度
失败返回:-1
4.2 lowerbound 函数
获取指定数组数组的下界
语法
lowerbound(array)
参数
array–>数组名 ls_arr
返回值
long
成功返回:array数组长度
失败返回:-1
小技巧
怎么将数组置空?
string ls_arr[],ls_null[] int i for i=1 to 10 ls_arr[i]=string(i) next messagebox('数组长度',UpperBound(ls_arr)) ls_arr = ls_null messagebox('数组长度',UpperBound(ls_arr))