Create parameters for ‘previous_A’ and 'difference_A'
Create a boolean parameter called ‘set_previous’
You don’t need a parameter for ‘current_A’ because that is ‘A’
if set_previous = 0 then
previous_A = A
PARAMETERS previous_A = previous_A
set_previous = 1
PARAMETERS set_previous = set_previous
endif
difference_A = previous_A - A
PARAMETERS difference_A = difference_A
This will constantly give you the difference based on the original ‘previous_A’.
Now you can set a new value for ‘A’ and turn off the ‘set-previous’ switch and it will reset the ‘previous_A’ value and the switch will instantly turn back on again.
Type in a new value for A and you will have a new difference.
Not quite sure what you would want this for but it will work.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11