New topic: 

Resetting an array

<http://forums.realsoftware.com/viewtopic.php?t=25238>

       Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic         Author  
Message       Ramon           Post subject: Resetting an arrayPosted: Fri Nov 
14, 2008 1:58 pm                               
Joined: Thu Jun 22, 2006 2:16 am
Posts: 91
Location: Barcelona              I have a very big  numerical array (lets say 
20000 items in it).
I must reset all values to zero
Code:dim q(20000) as double
' I populate the array and work with it
for i as integer=0 to 20000
  q(i)=0.0
next i

My question is: does it exist a faster way to do it? 
Can I erase (eliminate) the array a dimension it again?     
_________________
Thanks,
Ramon
----------------------------------------------------------------
REALbasic 2008 r4 Professional - Licensed
Windows XP-sp3 & Vista - Registered and Activated  
                            Top               Steve Garman           Post 
subject: Re: Resetting an arrayPosted: Fri Nov 14, 2008 2:01 pm                 
              
Joined: Fri Sep 30, 2005 3:53 pm
Posts: 2495
Location: England              Have you triedCode:dim q(20000) as double
// ...
redim q(-1)
redim q(20000)
     
_________________
Steve Garman
Using REALbasic 2008r2 Professional on Windows Vista Ultimate
Occasional blog  
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to