On 03/25/08 Eric Brunson uttered the following other thing:Philippe Le Gal wrote:Hi, I try to generate an array filled in a c cgi like this : char values[15][4]; int x; // populate values for (x = 0; x < 15; x++) { sprintf(values[x], "%d", map[x]); } for (x = 0; x < 15; x++) { hdf_set_valuef(cgi->hdf, "Values.%d=%s", x, values[x]); } I can see that the hdf is filled with the values when debugging :[snip]But I need a loop to make the job. So I tried : <?cs loop:x=#0,#15 ?><?cs var:Values.x ?><?cs /loop ?>The right syntax here is: <?cs loop:x=#0,#15 ?><?cs var:Values[x] ?><?cs /loop ?> or even: <?cs loop:x=15 ?><?cs var:Values[x] ?><?cs /loop ?> though that's pretty gross (assumes start is 0). I'm really not a fan of the loop syntax...Have you tried: <?cs for: v in Values ?><?cs var: v ?><?cs /loop ?>The right one here is: <?cs each:v=Values ?><?cs var:v ?><?cs /loop ?>
Ooops, I was going from memory and didn't look at the docs. Sorry.