Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
service
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
Freenet DSL
Who's Online
8 user(s) are online (6 user(s) are browsing encyclopedia)

Members: 0
Guests: 8

more...
partner

Singleton variable

A singleton variable, in computer programming, is Variable that is referred to only 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_programming_language-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 programming tool should report singleton variables but also allow specific instances to be marked as deliberate by the programmer.