> I think I'll just give up on the dynamic array idea, as too ambitious.
It sounds great, if you have a need for it. There may be a need for it
later in the future, so we can dream untill then :)

I'm sure I'll eventually think of an excuse for needing a dynamic
array.

> How about this instead:  you could come up with some sort of external
> template and 'generator' tool, perhaps in Python, that would generate
> specific instances of your 'array library' on demand (of an end-
> user)?  Something like:
>
> make_large_array myarray1 dword 800 > myarray1.jal
> make_large_array myarray2 byte 2048 > myarray2.jal
>
> This would give us the ultimate in efficiency, and also the ability
> for multiple arrays of various sizes.
>
> But if you prefer to stick with your original approach, may I suggest
> that you cut and paste it into 3 different libraries, one for each:
> byte, word, and dword?  This would allow you to streamline the code
> and make it easier to understand and maintain.

I put it all into one lib instead of 3 different libs so that the user
can choose size of variables without changing lib includes, it makes
it more like a regular array and easier to use. If you are writing a
jal program and have an array, you may often change your mind about
what variable size you want, or you may want your program
customizable. It is quite important for my fat32 lib to be memory
space customizable. Here's a simple example of why you would want byte
word & dword all in one file:

const word MY_USER_DATA = 100
if MY_USER_DATA < 256 then
  const byte BYTE_SIZE = 1
else
  const byte BYTE_SIZE = 2
end if

const dword LARGE_ARRAY_VARIABLE_SIZE = BYTE_SIZE
include large_array
ALIAS entry_location is large_array_1

you cannot put an include within an if statement.


I don't know if a python script is needed, why not just have 4 lib
files? or one lib file with code copied. How many large arrays can fit
on a PIC anyways? If you have 4, byte*1 arrays with 512 entries, you
are filling up your PIC's with 2048 bytes. How many large arrays would
you plan on using?

I don't think this lib is hard to maintain unless we do add dynamic
array's, but maybe dynamic array's can have a seperate library since
they must be in the form large_array(address, byte).


Matt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to