Quick way to initialize array with all zeros



I want to initialize a large array with 0's... do I have to use a for-loop
or is there some trick to accomplish this?


.



Relevant Pages

  • Re: Is it possible to print enums text?
    ... There is an easy to use trick to accomplish that. ... This causes the array element whose offset is identical to the ... This is wasteful, if not impossible, if the enum values are sparse, ...
    (comp.unix.programmer)
  • RE: copying to a multidimensional array?
    ... I'm trying to copy data from a 1D array to a 2D array. ... This seems to suggest that there should be some way to accomplish ... lots of 1D subarray objects. ... Anybody know the trick? ...
    (microsoft.public.dotnet.languages.csharp)
  • A neat trick to serialize arrays and hashes
    ... who thinks that my trick is "obvious to everyone but inexperienced ... hashes -- that is, it can pack and unpack arrays and hashes to and ... I might want to serialize @a into a string for the purpose of storing ... array into a string like so: ...
    (comp.lang.perl.misc)
  • Re: best practice if then else
    ... Is the best way to accomplish this a long list of ... the value of the element of the array Arr corresponding to the selected ... buttons select which Easter function is to be tested (years in error, ...
    (comp.lang.javascript)
  • Referencing Variables By Name in a String
    ... so creating them in an array isn't really an option. ... There are several variable groups like this - this is only one of them. ... <now start the code referencing this item> ... Does anyone know a way to accomplish something like this. ...
    (comp.lang.ruby)