Question: How to assign a number explicitly?

Hi friends,

It is a simple question but I got confused... The best way to explain the problem is the example below (I modified my example to make it more clear and easier):

gCount := 1;

hCount := 5;

dCount := 10;

lineCounter := 1;

for k to gCount do

  for i to hCount do

    for j to dCount do

      T_11[i, j][k] := proc (i, j, x, y) options operator, arrow; lineCounter end proc

     # Or the expression is: T_11[i, j][k] := (i, j, x, y)->lineCounter;

    end do:

    lineCounter := lineCounter+1;

    print(T_11[1, 1][1](1, 1, 1, 1))

  end do:

end do:

Here I want each T_11 to be a function of parameter lineCounter at the time it is evaluated. lineCounter is changing incrementally and my expected test function is:

T_11[1, 1][1](1, 1, 1, 1)=1

But since all T_11 functions now depend on lineCounter explicitly, and not the value at the time, at every loop the function T_11[1, 1][1](1, 1, 1, 1) is changing based on the value of lineCounter. Please let me know how I can cut the dependency of each T_11 function from lineCounter and enforce maple to calculate it just based on the number as is.

Thank you!

Please Wait...