Hi!
In C and other languages you can declare array sizes by using named constants instead of hardcoded numbers. I have tried to do the same in Kuka KRL in both the data list and in the source file without success. I can only declare arrays by using hardcoded numbers. This makes a maintenance problem if you have multiple arrays that should be the same size and you need to change the size in the future.
What I try to do (but, it's not working):
CONST INT MY_CONSTANT= 5
DECL INT firstArray[MY_CONSTANT]
DECL INT secondArray[MY_CONSTANT]
I repeat that this is about declaring arrays, not initializing them. Is this not possible in KRL or is there som alternative way I should use?
Thanks!