DADiSP Worksheet Functions > Function Categories > Display and Manipulation > CALC

 

CALC

Purpose:

Sets Worksheet recalculation mode.

Syntax:

CALC(mode)

mode

-

Optional. An integer, the calculation mode:

 

 

-1:

Break cyclical calculations

 0:

OFF

 1:

ON, immediately update Windows (default)

 2:

Step through cyclical calculations

 3:

ON, but do not immediately evaluate changed Windows

 4:

ON, but evaluate current Window only

Example:

calc(1)

 

specifies automatic Window recalculation.

Example:

calc(0)

 

disables automatic recalculation.

Example:

W1: {1000}

W2: 0.1 * W3

W3: prev = curr; W1-W2; if(abs(curr-prev) < 1e-6, calc(-1));

 

Sets up a cyclical Worksheet. Now:

 

W3 = 0

 

causes the Worksheet to recalculate until the change in W3 is less than 1e-6.

Example:

W1: 1..5

W2: W1 * W1

 

calc(4)

 

W1[2] = -10;

W1[4] = -10;

 

Sets up deferred calculations. W1 == {1, -10, 3, -10, 4} and W2 == {1, 4, 9, 16, 25} because only W1 updates and W2 preserves the original values. Now:

 

calc(1)

 

causes W2 to update with the values {1, 100, 9, 100, 25}.

Remarks:

If the calculation mode is OFF, or disabled, you can enter Window formulae without immediately calculating new series results. Once you type CALC(0), enter new formulae in the desired Windows and then type CALC(1) to reset the Worksheet to automatic mode. DADiSP will automatically update each Window as needed.

 

CALC(2) steps through cyclical calculations that are mutually dependent. A progress message is displayed in the status area. Press the space bar to step to the next iteration.

 

CALC(3) turns on auto-calculation, but does not immediately evaluate changed Windows. The Windows will re-evaluate after a formula has been entered.

 

CALC(4) turns on auto-calculation for the current Window only. Dependent Windows do not change. The dependent Windows will re-evaluate with CALC(1).

 

CALC(-1) terminates a cyclic calculation. A cyclic calculation will continue until CYCLE_COUNT number of iterations are performed or until CALC(-1) is executed.

See Also:

= (Variable Assignment)

PLOTMODE

PROTECT

REFRESH

UPDATE