代码之家  ›  专栏  ›  技术社区  ›  Clem

如何清除列表?

  •  3
  • Clem  · 技术社区  · 10 年前

    我有一个列表,我想重复使用,但我还没有弄清楚如何清除它以前的条目。

    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
    
    1 回复  |  直到 10 年前
        1
  •  9
  •   Dmytro Pastovenskyi    10 年前
    Erase x ' delete whole list
    Erase x(el) ' delete element