runningdifference

The runningdifference statement calculates the running difference for the current field.


Parameters

No parameters.


Description

The runningdifference statement starts at the top of the database and subtracts each cell from the cell above it. As it scans the database it fills the field with the running total, destroying the original data in the process.

This example calculates the gas mileage after each fillup. Since the runningdifference statement will destroy the field it is used on, the procedure copies the Odometer data into a separate field called Miles. The runningdifference statement computes the number of miles driven on a tank of gas (the difference between the two odometer readings).

field Miles
formulafill Odometer
runningdifference
field Mileage
formulafill Miles/Gallons

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.