I'm converting some code from some ugly C. The code defines one particular
array, and a constant like this:

static float snorm[169];
static float *p = snorm;

and then later has an assignment:

*snorm = 1.0;

and then again later (n is an integer iterator):

*(snorm+n) = *(snorm+n-1)*(float)(2*n-1)/(float)n;

The question is this: It looks like the code is simply assigning values to
an array, so why bother with the pointers? Elsewhere the code uses arrays
normally (ie. indexing them with the square brackets) so that makes me think
maybe this is doing something other than just putting values into the array.
Also, I'm assuming that the "p" variable is just a pointer into snorm?

Can anyone make this clear for me?

Cheers,
Phil.

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to