Do I understand correctly that these static arrays will be an extension of
static variables?
(meaning static variable that accepts array)


Joseph Biran
____________________________________________


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Tomasz Janeczko
Sent: Monday, August 06, 2007 8:49 AM
To: [email protected]
Subject: Re: [amibroker] Re: Second thoughts on Static arrays --DLL approach

Dennis,
 
More likely than not, one of upcoming versions will have "static arrays".

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: Dennis Brown 
To: [email protected] 
Sent: Monday, August 06, 2007 5:37 PM
Subject: Re: [amibroker] Re: Second thoughts on Static arrays --DLL approach

Paul, 

Thanks, your comment sparks my interest if this could be written (I have
never written a dll before).  
I could imagine a VERY simple approach for the static arrays that I have
been talking about:

1. A function to allocate a block of memory of a fixed number of arrays by a
fixed length of arrays:  error = AllocateArrays(100,2000);
2. A function to save an array to one of the blocks:  error =
SaveMyArray(MyArray30, 30);
3. A function to get an array from one of the blocks: MyArray30
= GetMyArray(30); //null result on error
4. A function to deallocate the block of memory: DeallocateArrays();

Of course to be general purpose, the "Pane" running the AFL would have to
associated with an allocated block.

The main question of practicality would be how fast would it run?

Since I am looking at only saving a fixed history of bars, I would not even
have to allocate the space except once on startup, but the space would need
to be deallocated if the AFL quit -- though just starting the AFL with a
onetime DeallocateArrays(); might be good enough.

I would like to hear more comments on the practicality of this.

Thank you,
Dennis Brown

Reply via email to