如何清除列表?
How can you clear a List?
我有一个我想重复使用的列表,但我一直无法弄清楚如何清除它以前的条目。
dim x list as string, i as integer
for i = 1 to 4
x("a"+cstr(i)) = "blue"+cstr(i)
x("b" +cstr(i)) = "green"+cstr(i)
<do some stuff>
<Before I loop back around, I want to clear 'x' so it does not contain the previous entries>
next
Erase x ' delete whole list
Erase x(el) ' delete element
我有一个我想重复使用的列表,但我一直无法弄清楚如何清除它以前的条目。
dim x list as string, i as integer
for i = 1 to 4
x("a"+cstr(i)) = "blue"+cstr(i)
x("b" +cstr(i)) = "green"+cstr(i)
<do some stuff>
<Before I loop back around, I want to clear 'x' so it does not contain the previous entries>
next
Erase x ' delete whole list
Erase x(el) ' delete element