Very basic but I need some confirmation and an explanation why I need to
repeat calculations inside and outside of loops in order to achieve what I
need.

Simplified pseudocode to illustrate my problem

First:
-----------------------
Initialize a set of variables
  Var 1 = Var2 = 100000;///some quantity
  Var 1[0] = Var2[0] = 0; initialize

For loop
  {
    Var 3 = Var 1 * Var 2;
    . . . 
    Other calculations
  }

Filter = 1;
Addcolumn(Var3, "Var1"); < < < Produces error "Var3 not initialized"
Etc

Do this:
Second:
-------------------------------
Initialize a set of variables
  Var 1 = Var2 = 100000;///some quantity
  Var 1[0] = Var2[0] = 0; initialize

For loop
  {
    Var 3 = Var 1 * Var 2;
    . . . 
    Other calculations
  }

Var 3 = Var 1 * Var 2;  < < < Repeat calculation done above inside loop
solely to be able to execute Addcolumn statement

Filter = 1;
Addcolumn(Var3, "Var1"); < < < NO ERROR PRODUCED
Etc

All of these are AFL statements, all have been processed in memory.  
Key question:
*************************
Why do I have to repeat the calculation statements outside of the loop in
order to avoid the "initialize" error?
*************************

Basic question, probably dumb.  Yes, I have read the associated help pages
on this but I do not see the answer to the above if it is there.

Can someone please educate me on this basic issue.  In some code I have, I
have a LOT of the calculations that have to be done both inside the loop as
well as outside and I right now have a significant time penalty as I am
trying to process 9800 symbols in a single exploration.  I am looking for
anything I can find to reduce the processing time.

Thanks,

Ken

Reply via email to