HOME

TheInfoList



OR:

A trace table is a technique used to test algorithms in order to make sure that no logical errors occur while the
calculations A calculation is a deliberate mathematical process that transforms one or more inputs into one or more outputs or ''results''. The term is used in a variety of senses, from the very definite arithmetical calculation of using an algorithm, to t ...
are being processed. The table usually takes the form of a multi-column, multi-row table; With each column showing a
variable Variable may refer to: * Variable (computer science), a symbolic name associated with a value and whose associated value may be changed * Variable (mathematics), a symbol that represents a quantity in a mathematical expression, as used in many ...
, and each row showing each number input 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 certain calculations works and the systematic process that is occurring when the algorithm is executed. They can also be useful for debugging applications, helping the
programmer A computer programmer, sometimes referred to as a software developer, a software engineer, a programmer or a coder, is a person who creates computer programs — often for larger computer software. A programmer is someone who writes/creates ...
to easily detect what error is occurring, and why it may be occurring.


Example

int i, x = 0; for (i = 1; i <= 10; i++)


See also

*
Algorithms In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing c ...
*
Programming languages A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
*
Debugging In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...


References

* http://www.comscigate.com/tutorial/KjellStyle/WilliamChen/trace1.html * http://www.thevickerage.worldonline.co.uk/theteacher/alevel/assem/assem5.htm
archived version
* http://portal.newman.wa.edu.au/technology/12infsys/html/KWH2003/TraceTables.htm

Debugging {{Algorithm-stub