<div class="gmail_quote">On Sat, Aug 27, 2011 at 15:10, Likun Tan <span dir="ltr"><<a href="mailto:likunt@andrew.cmu.edu">likunt@andrew.cmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":1gm">DAGetCorners(da2D, &xs, &ys, 0, &m, &n, 0);<br>
DAVecGetArray(da2D, VS, &S);<br>
for(j=ys; j<ys+n; j++) {<br>
for(i=xs; i<xs+m; i++) {<br>
S[j][i]=g(temp); //function evalution<br></div></blockquote><div><br></div><div>How does the function g know how to index temp[k][j][i]? I.e. how does it get access to those variables? Is it a macro instead of a function? Note that the value of k is stale here because it will be equal to zs+p.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":1gm">
}<br>
}<br>
<br>
f(temp) and g(temp) are functions of temp[k][j][i], when i assigned values<br>
to H, there is no error; while when setting values to S using temp, it<br>
gives errors, if using f(i,j,k) to assign values to S, it works fine.</div></blockquote></div><br>