Rabbit Web: Value of array's element as index of element of another array

Hello,

I work with a Rabbit 6700 and Dynamic C 10.66.

Example:

int A[3] = {11, 22, 33};
#web A
int B[3] = {1, 2, 3};
#web B

in browser:

shows “1”,
shows “22”,
but shows “ZHTML ERROR: Unknown variable”

What the problem, and why it doesn’t work correctly?

Thanks for your help.

First, note that RabbitWeb makes use of single-letter variable names for loop control. You should be using multi-letter variable names in your program.

Second, RabbitWeb does not support multiple levels of array indexing. You can work around this by using a loop:


int foo[3] = {11, 22, 33};
#web foo
int bar[3] = {1, 2, 3};
#web bar


 shows "1"
 shows "22"

 shows "22"


It’s a bit of a hack, but it accomplishes your goal.

Finally, please use the latest version of Dynamic C (10.72A). You can view the Release Notes for an idea of how many bugs have been fixed since the 10.66 release you’re using. There’s also a 10.72B release in the works – you can see what’s going into that on the GitHub repository for Dynamic C.

https://github.com/digidotcom/DCRabbit_10