Array & compilation problem

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Maverick
Posts: 69
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Array & compilation problem

Post by Maverick »

any advice about the following issues with attached flowcode fcfx please

issue 1: my understanding of arrays in flowcode is that a string array variable; array_name[3] should allow 4 string array entries (0 -3) with a default length of 20 to be used in a calculation box, this does not appear to be the case, I have had attached the string length to the variable definition to get it to accept a text string in the calculation box. what is the correct structure. flowcode wiki does not make it very clear

issue 2: why the attached flowcode appears to add the array index to the end of the string to be printed apart from the last. i have tried it with a ssd1306 display with the same result. this is simulation only, I haven't tried actual hardware yet

issue 3: when I compile it using pic16f1769 the complier generates the error below. if I use the pic16f18877 it compiles just fine. both chips have same sdram. it's not program size as when it compiled, only 20% was used
ssd1322_new_rig.c: 549: (1250) could not find space (2048 bytes) for variable _FCV_07241_gLCD_SSD1322_buffered1__DRAM
attached are compilation text files
Attachments
ssd1322_new_rig_16f18877.msg.txt
(2.72 KiB) Downloaded 298 times
ssd1322_new_rig_16f1789.fcfx
(15.57 KiB) Downloaded 308 times
ssd1322_new_rig_16f1789.msg.txt
(2.27 KiB) Downloaded 221 times

mnfisher
Valued Contributor
Posts: 1462
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Array & compilation problem

Post by mnfisher »

x[3] just creates a string with 3 characters. To create an array of strings you need

x[4][20] to create an array of 4 x 20 character strings.

You can access these as x[0] .. x[3]

Martin

Maverick
Posts: 69
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: Array & compilation problem

Post by Maverick »

Martin
thanks for confirming what I found out eventually, flowcode wiki very confusing

Maverick
Posts: 69
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: Array & compilation problem

Post by Maverick »

regarding point 3 I misread the data sheet, the 1789 has 2048 sdram while the 1877 has 4096

Post Reply