Built from template.html singleton variable from FOLDOC foldoc.org: wombat.doc.ic.ac.uk & foldoc.doc.ic.ac.uk:

singleton variable

<programming>

A variable which is only referred to once in a piece of code, probably because of a programming mistake. To be useful, a variable must be set and read from, in that order. If it is only referred to once then it cannot be both set and read.

There are various exceptions. C-like assignment operators, e.g. "x += y", read and set x and return its new value (they are abbreviations for "x = x+y", etc). A function argument may be passed only for the sake of uniformity or to support future enhancements. A good compiler or a syntax checker like lint should report singleton variables but also allow specific instances to be marked as deliberate by the programmer.

Last updated: 1997-12-20

Nearby terms:

single static assignmentsingleton variableSingle Virtual Storage

Try this search on Wikipedia, OneLook, Google


if HTMLCOMMENTBOX
Loading

end HTMLCOMMENTBOX footer
content
left
left-mid right
container Quantcast Google Analytics