Multiple Arrays Problem
Posted: Mon Feb 22, 2021 2:59 pm
Hi everybody,
hope someone could help me with variables with multiple array indexes...
i use variables with multiple array indexes, because sometimes its more easy to use it and the number of variables is significant less...
first of all, in simulation everything works fine and well, but after compiling on the hardware it fails. during compiling it gives no errors.
my knowledge of arrays is this:
var[10] means 10 variables var from var[0] to var[9]
when i use:
var[2][3] means var[0] has 4 possibilities, var[1] has 4 possibilities, var[2] has 4 possibilities, so a total of 12 possibilities.
Now (see pictures and test program) to show my problem:
Test_str[10][10][20]
Var_fl[10][10]
I made a floating variable with double index array and a string with double index array(string each 20 characters)
The 1st string (2 characters)is not displayed on the hardware (in the simulation works fine)
According to me, when I use a “floattoString” with 2 decimals from a single value it makes a string of 4 characters.
So, if I convert a value to string it will show on the hardware, if I write down a string between “” it won’t show it on the hardware…
Another “strange” thing..
When I make the first string 1 character for example “q”, it will also show on the hardware, but that could not be the solution… the last [20] means 20 characters long…
Is there something I’m doing wrong or maybe a bug during compiling?
Hope someone could help me.
hope someone could help me with variables with multiple array indexes...
i use variables with multiple array indexes, because sometimes its more easy to use it and the number of variables is significant less...
first of all, in simulation everything works fine and well, but after compiling on the hardware it fails. during compiling it gives no errors.
my knowledge of arrays is this:
var[10] means 10 variables var from var[0] to var[9]
when i use:
var[2][3] means var[0] has 4 possibilities, var[1] has 4 possibilities, var[2] has 4 possibilities, so a total of 12 possibilities.
Now (see pictures and test program) to show my problem:
Test_str[10][10][20]
Var_fl[10][10]
I made a floating variable with double index array and a string with double index array(string each 20 characters)
The 1st string (2 characters)is not displayed on the hardware (in the simulation works fine)
According to me, when I use a “floattoString” with 2 decimals from a single value it makes a string of 4 characters.
So, if I convert a value to string it will show on the hardware, if I write down a string between “” it won’t show it on the hardware…
Another “strange” thing..
When I make the first string 1 character for example “q”, it will also show on the hardware, but that could not be the solution… the last [20] means 20 characters long…
Is there something I’m doing wrong or maybe a bug during compiling?
Hope someone could help me.