HOME

TheInfoList



OR:

In
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as ana ...
, oxbow code refers to fragments of program code that were once needed but which are now never used. Such code is typically formed when a program is modified, either when an item is superseded with a newer version but the old version is not removed, or when an item is removed or replaced, but the item's supporting code is not removed. Such code is normally removed unless sufficiently amusing or educational. Similarly, variables and data structures can be left around after the last code that used them has been removed, though this is more commonly called unused or
unreferenced variable An unreferenced variable in the source code of a computer program is a variable that is defined but which is never used. This may result in a harmless waste of memory. Many compiler In computing, a compiler is a computer program that trans ...
s. The term is taken by analogy with
oxbow lake An oxbow lake is a U-shaped lake or pool that forms when a wide meander of a river is cut off, creating a free-standing body of water. In South Texas, oxbows left by the Rio Grande are called '' resacas''. In Australia, oxbow lakes are call ...
s which are formed in nature when a bend in a river becomes so pronounced that the water breaks through from before the bend to after it, making the river straight again. When the sides of the new course silt up, a curved lake is left, disconnected from the main stream.


Examples

(fro
gnash/server/asobj/Global.cpp 1.46
static void as_global_escape(const fn_call& fn) { // List of chars we must convert to escape sequences const string strHexDigits = "0123456789ABCDEF"; string strInput = fn.arg(0).to_string(); URL::encode(strInput); fn.result->set_string(strInput.c_str()); } In this, "strHexDigits" is oxbow code (or oxbow data).


See also

*
Dead code The term dead code has multiple definitions. Some use the term to refer to code (i.e. instructions in memory) which can never be executed at run-time. In some areas of computer programming, dead code is a section in the source code of a program whic ...
*
Unreachable code In computer programming, unreachable code is part of the source code of a program which can never be executed because there exists no control flow path to the code from the rest of the program. Unreachable code is sometimes also called ''dead code' ...
Source code