Re: Fastest way to reset to zero an array

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Is there a better way?

Erase ArrayName

--
Jim
"Charles" <spam@xxxxxxxxxxx> wrote in message
news:1188904144.609096.284230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Hello
|
| This is a relatively simple question but I can't find it on google
| group. What is the fastest way to reset an array to zero (or the value
| by default). (in this case, performance is key, every micro-second
| counts!)
|
| Intuitively, I would say that going through every single cell and
| setting it to zero must be under-efficient, as VBA has to interpret a
| let more instructions that if there is a function that already does
| that. I was thinking to "redim". But zero-ing an array is not redim's
| main purpose. Is there a better way?
|
| Thanks
| Charles
|


.



Relevant Pages

  • Fastest way to reset to zero an array
    ... This is a relatively simple question but I can't find it on google ... What is the fastest way to reset an array to zero (or the value ...
    (microsoft.public.excel.programming)
  • Re: Arrays of zero length
    ... The minor strangeness is that when you allocate an array to zero size, ... saying something like that allocating an array makes it undefined ... In f77, zero-size was disallowed, ...
    (comp.lang.fortran)
  • Re: should every thing be zero indexed?
    ... Other families of languages count from 1. ... its number is zero: I always start counting at zero". ... > as a fundamental concept in both the definition of array indices and ... > for I in foo'range loop ...
    (comp.programming)
  • Re: Subset Sum problem (w/ limited scope)
    ... The "Subset Sum" problem (stated various ways depending on what you ... a subset of those integers that sums up to zero. ... Are there going to be duplicate values in your original array? ...
    (comp.lang.fortran)
  • Re: addEvent - The late entry :)
    ... take any number of arguments and append them to an array. ... argument, which is fine on everything but Firefox, where it makes the ... 20 arguments Windows Safari 3 executes that expression in 48% of the ... and at zero arguments 47%. ...
    (comp.lang.javascript)