Hi Justin,
PBP creates temporary variables as needed to handle complex formula's.
<pre>x =((x*2)+3) + (y*2+1)/$4+(z+1)*2+(d*/250*2)+m dig 2</pre>For the above formula, PBP will need 5 temporary vars. (T1-T5) The more complex the formula, the more temp vars that are needed.
Correcting the problem can be done 2 different ways.
<hr>1. Break the formula into smaller sections. Changing the above formula to something like this ...<pre>x =((x*2)+3) + (y*2+1)/$4+(z+1)*2<br>x = x +(d*/250*2)+m dig 2</pre>will reduce the number of temp vars required to 3, which will fit into the existing program.
<hr>2. Modify the ReEnterPBP file to handle more Temp vars.
For each additional temp variable, create a new place to save it..
<pre> T5_Save VAR WORD</pre>In the SavePBP: routine, add a condition to save the variable.<pre> ifdef T5<br> MOVE?WW T5, _T5_Save<br> endif</pre>And in the RestorePBP: routine, add a condition to restore the variable.<pre> ifdef T5<br> MOVE?WW _T5_Save, T5<br> endif</pre>Then adjust the error message to trigger at a higher number.<pre> ifdef T6<br> ERROR "Temp variables exceeding T5"<br> endif</pre>Repeat, untill you no longer get an error.
HTH,
Darrel
Bookmarks