Flowcode Arrays
Flowcode Arrays
Can you please tell me the maximum number of elements I can use in an integer array. Are 2-dimensional arrays permitted ?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Hello Gnu
Two dimensional arrays are not permitted in Flowcode but you can implement them via the C code flowchart icons.
The maximum size of an array is 64 bytes. This represents an entire page in memory. This means that for an integer array the maximum you can have is 32 elements.
Two dimensional arrays are not permitted in Flowcode but you can implement them via the C code flowchart icons.
The maximum size of an array is 64 bytes. This represents an entire page in memory. This means that for an integer array the maximum you can have is 32 elements.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
It may be more that 64 bytes. This is from the BoostC manual:
So in reality it depends on the chip and what other variables you are using (18F devices have up to 256 bytes available in each RAM bank, so the theoretical maximum is 256 array elements).[/code]Arrays can have any number of dimensions. The only constraint is that an array must fit into a single RAM bank.
Flowcode Arrays
Thanks for this supplementary information, Steve. I am using a 16F88 at the moment, but this isn't set in stone. Ideally I need to store 75 integers in the array; however, I can probably get round the problem by using more than one array.
Gnu.
Gnu.
Flowcode Arrays
Sorry to keep plaguing you! However, I have just tried a few simulations, and the Flowcode V3 progam crashes if the array declaration is greater than [35].
Gnu
Gnu
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Hello Gnu
If you are creating an integer array then each integer location will take up two bytes. This means that an int array declared as 35 will actually have 70 byte locations. You should be able to create your program using two arrays. Then you can do a decision eg depending on a index variable to choose which array your looking at.
If you are creating an integer array then each integer location will take up two bytes. This means that an int array declared as 35 will actually have 70 byte locations. You should be able to create your program using two arrays. Then you can do a decision eg depending on a index variable to choose which array your looking at.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel