flagvariable
nounUK /flæɡ ˈveəriəbl/
US /flæɡ ˈveriəbl/
A flag variable is a little switch in a computer program that remembers if something has happened.
The program uses a flag variable to remember whether the user has logged in.
OTHER MEANINGS
2. A variable that signals when a certain condition has been met inside a loop.
She set the flag variable to true when the search found the item.
3. A simple true-or-false value used to control program flow.
The flag variable starts as false and changes only after the check passes.
4. A marker used to track whether an event has already occurred.
A flag variable prevents the same message from being printed twice.