- Trace table
A
trace table is a technique used to test algorithms, in order to make sure that no logical errors occur whilst thealgorithm is being processed. The table usually takes the form of a multi-column, multi-row table; With each column showing avariable , and each row showing each number inputted into the algorithm and the subsequent values of the variables.Trace tables are typically used in schools and colleges when teaching students how to program, they can be an essential tool in teaching students how a certain algorithm works and the systematic process that is occurring when the algorithm is executed.
They can also be useful for debugging applications, using a trace table can help a
programmer easily detect what error is occurring, and why it may be occurring.Example
:"x = 0":"For i = 1 to 10"::"x = x+i":"Next i"
This example shows the systematic process that takes place whilst the algorithm is processed, as the values of "i" and "x" change, their new values are recorded in the trace table, this example shows why trace tables are useful for debugging and in education, they make following an algorithmic process easy to follow and understand.
See also
*
Algorithms
*Programming languages References
* http://e-subjects.co.uk/mod/resource/view.php?id=1360
* http://www.thevickerage.worldonline.co.uk/theteacher/alevel/assem/assem5.htm
* http://portal.newman.wa.edu.au/technology/12infsys/html/KWH2003/TraceTables.htm
Wikimedia Foundation. 2010.