Yep, Luckily the arrays usage are pretty normal. I don’t think they have multi-dimensional arrays, but…
I used arrays as well in the conversion of the phoenix code to propeller…
Both with data arrays and normal arrays. Things like:
DAT
GetACos byte 255,254,252,251,250,249,247,246,245,243,242,241,240,238,237,236,234,233,232,231,229,228,227,225
byte 224,223,221,220,219,217,216,215,214,212,211,210,208,207,206,204,203,201,200,199,197,196,195,193
byte 192,190,189,188,186,185,183,182,181,179,178,176,175,173,172,170,169,167,166,164,163,161,160,158
byte 157,155,154,152,150,149,147,146,144,142,141,139,137,135,134,132,130,128,127,125,123,121,119,117
byte 115,113,111,109,107,105,103,101,98,96,94,92,89,87,84,81,79,76,73,73,73,72,72,72,71,71,71,70,70
byte 70,70,69,69,69,68,68,68,67,67,67,66,66,66,65,65,65,64,64,64,63,63,63,62,62,62,61,61,61,60,60,59
byte 59,59,58,58,58,57,57,57,56,56,55,55,55,54,54,53,53,53,52,52,51,51,51,50,50,49,49,48,48,47,47,47
byte 46,46,45,45,44,44,43,43,42,42,41,41,40,40,39,39,38,37,37,36,36,35,34,34,33,33,32,31,31,30,29,28
byte 28,27,26,25,24,23,23,23,23,22,22,22,22,21,21,21,21,20,20,20,19,19,19,19,18,18,18,17,17,17,17,16
byte 16,16,15,15,15,14,14,13,13,13,12,12,11,11,10,10,9,9,8,7,6,6,5,3,0
or
VAR '' Global Variables and Cog Stack Space
'====================================================================
'[ANGLES]
long CoxaAngle1[6] 'Actual Angle of the horizontal hip, decimals = 1
long FemurAngle1[6] 'Actual Angle of the vertical hip, decimals = 1
long TibiaAngle1[6] 'Actual Angle of the knee, decimals = 1
'-
Usage is pretty simple...
CoxaAngle1[LegIKLegNr] := ((Atan4*180) / 3141) + cCoxaAngle1[LegIKLegNr]
For me the most difficult thing to remember when I unrusty myself our things like: what symbols did they use for the different operators (:= for assignment, >= has different meaning than =>…) Also things like when dealing with BYTE or WORD sized variables, they are always treated as unsigned, unless you use the operator to sign extend them…
Kurt