Jump to content

Flag (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Shaddack (talk | contribs) at 14:13, 21 June 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer programming, a flag is a Boolean variable, a bit that can be set to either 1 (Set, Raised, True) or 0 (Unset, False). Its typical use is as a status variable, or for configuration.

It is likely its name came from the small flags on the mailboxes used for delivery of letters and small shipments in the USA, which are customarily raised up by the postman as an indication that a new mail is in.