Page 1 of 1

Array & compilation problem

Posted: Sun Nov 06, 2022 3:04 pm
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

Re: Array & compilation problem

Posted: Sun Nov 06, 2022 3:37 pm
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

Re: Array & compilation problem

Posted: Sun Nov 06, 2022 3:47 pm
by Maverick
Martin
thanks for confirming what I found out eventually, flowcode wiki very confusing

Re: Array & compilation problem

Posted: Tue Nov 08, 2022 10:50 am
by Maverick
regarding point 3 I misread the data sheet, the 1789 has 2048 sdram while the 1877 has 4096