flag (plural flags)

1. A piece of cloth, often decorated with an emblem, used as a visual signal or symbol.
2. (Nautical) A flag flown by a ship to show the presence on board of the admiral; the admiral himself, or his flagship
3. The use of a flag, especially to indicate the start of a race or other event
4. (Computer Science) A variable or memory location that stores a true-or-false, yes-or-no value, typically either recording the fact that a certain event has occurred or requesting that a certain optional action take place.
5. (Computer Science) In a command line interface, a notation requesting optional behavior or otherwise modifying the action of the command being invoked.



What is a Flag?

A flag is a piece of cloth, often flown from a pole or mast, generally used symbolically for signalling or identification. The term flag is also used to refer to the graphic design employed by a flag, or to its depiction in another media.


The first flags were used to assist military coordination on battlefields and flags have evolved into a general tool for rudimentary signalling and identification, especially in environments where communication is similarly challenging (such as the maritime environment where semaphore is used). National flags are potent patriotic symbols with varied wide-ranging interpretations, often including strong military associations due to their original and ongoing military uses. Flags are used in messaging, advertising, or for other decorative purposes, though at this less formal end the distinction between a flag and a simple cloth banner is blurred. The study of flags is known as vexillology, from the Latin vexillum meaning flag or banner.