Solved

What is exactly meant by "flag" in computer programming?

Posted on 2007-04-01
2
651 Views
Last Modified: 2008-02-01
Word "flag" is used in computer programming almost on a daily basis.  A example of usage of this word is as follows:

Some car object property might be a flag representing whether or not the motor is running.  What is exaclty meant by flag?

Thanks.
0
Comment
Question by:naseeam
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 18834066
See http://en.wikipedia.org/wiki/Flag_%28computing%29 - I could not sum that up better: "In computer programming, flag refers to one or more bits that are used to store a binary value or code that has an assigned meaning."
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 18834730
Compare it to the expression : "flag something", as in mark it for some given purpose. A flag is just a mark that is either set or not for whatever reason you need it.

Usually it's only 1 bit - several flags can be grouped together (and often are) into one multi-bit value.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now