| p:abstract
| - 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. Flags are typically found as members of a defined data structure, such as a database record, and the meaning of the value contained in a flag will generally be defined in relation to the data structure it is part of. In many cases, the binary value of a flag will be understood to represent one of several possible states or statuses. In other cases, the binary values may represent one or more attributes in a bit field, often related to abilities or permissions, such as "can be written to" or "can be deleted". However, there are many other possible meanings that can be assigned to flag values. One common use of flags is to mark or designate data structures for future processing.
Within microprocessors and other logic devices, flags are commonly used to control or indicate the intermediate or final state or outcome of different operations. Microprocessors typically have, for example, a status register that is composed of such flags, and the flags are used to indicate various post-operation conditions, such as when there has been an arithmetic overflow. The flags can be utilized in subsequent operations, such as in processing conditional jump instructions. For example a je (Jump if Equal) instruction in the X86 assembly language will result in a jump if the Z (zero) flag was set by some previous operation.
A command line switch is also referred to as a flag. Command line programs often start with an option parser that translates command line switches into flags in the sense of this article. (en)
- Mit Flag wird eine binäre Variable im Arbeitsspeicher (RAM), in einem Register (Speicherbereich innerhalb eines Prozessors) oder ein Statusindikator bezeichnet, welcher als Hilfsmittel zur Kennzeichnung bestimmter Zustände benutzt werden kann. Ein Flag kann gesetzt, gelöscht oder ausgelesen werden. (de)
- En informatique, un drapeau ou fanion (flag en Anglais) est une valeur binaire (de type vrai ou faux) indiquant le résultat d'une opération ou le statut d'un objet. (fr)
- Un flag (parola inglese che significa bandierina) in informatica è una variabile che può assumere solo due stati ("vero" o "falso", "on" e "off", "1" e "0", "acceso" e "spento") e che segnala, con il suo valore, se un dato evento si è verificato oppure no, o se il sistema è in un certo stato oppure no (vedi anche voce in Glossario informatico).
Per esempio, nelle CPU sono presenti molti flag associati a operazioni matematiche, rappresentati con dei bit singoli organizzati in un importante registro apposito, il registro dei flag: fra i vari flag c'è il flag di zero, che assume il valore 1 ogni volta che l'ultima operazione matematica eseguita dalla CPU ha dato un risultato pari a zero, mentre assume il valore 0 se il risultato è stato un numero diverso da zero. Il valore dei vari flag viene usato nelle istruzioni di salto condizionato della CPU per decidere se saltare o meno.
L'operazione di porre il valore di un flag a "vero" viene detta impostare il flag, mentre porlo nello stato di "falso" viene detto resettare il flag. (it)
- フラグとは、コンピュータまたはコンピュータ・プログラムで、処理の条件判定結果を保持するレジスタまたは変数のことを言う。レジスタについてはステータスレジスタともいう。
コンピュータ・プログラムの条件判断では、条件が合っていればTrue、否であればFalseとなる。Trueの場合を「フラグが立っている」と言い、またTrueにする事を「フラグを立てる」と言う。
例を挙げると、鉄道の分岐器は、「信号機と連動しなければならない」という前提がある。現在これらの制御は、殆どの線区でCTCがPRCの命令を受けて行っている。この時、分岐器の開通方向の信号機は、分岐器の動作結果のフラグを判断して現示するようになっている。True=進行、False=停止(二灯式の場合) (ja)
- Flaga lub znacznik w informatyce odnosi się do jednego lub więcej bitów, które wykorzystywane są do przechowywania binarnej informacji, która posiada pewne znaczenie. Najczęściej flagi wykorzystywane są do kontrolowania wykonywanego przez procesor kodu. Mogą posiadać informacje takie jak znak wyniku operacji (dodatni lub ujemny) czy też parzystość jego bitów. (pl)
- Em informática, uma flag (bandeira, em português) é um mecanismo lógico que funciona como semáforo: uma entidade (objecto) detém como activa uma determinada flag se a característica associada a essa flag estiver presente. Em programação, a utilização de flags como interruptor (i.e., valores 0/1, ligado/desligado, activo/inactivo) permite optimizar as estruturas de dados, na medida em que basta apenas um bit para activar determinada característica. Assim, com um simples byte podem-se especificar 8 características de um objecto, conhecendo, de antemão, o significado de cada bit.
Se a estrutura da flag for baseada num sistema binário, então as operações de activação e desactivação e teste serão também optimizadas (ao nível do processamento) já que apenas requerem operações simples de lógica binária. (pt)
|
| rdfs:comment
| - 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. Flags are typically found as members of a defined data structure, such as a database record, and the meaning of the value contained in a flag will generally be defined in relation to the data structure it is part of. In many cases, the binary value of a flag will be understood to represent one of several possible states or statuses. (en)
- Mit Flag wird eine binäre Variable im Arbeitsspeicher (RAM), in einem Register (Speicherbereich innerhalb eines Prozessors) oder ein Statusindikator bezeichnet, welcher als Hilfsmittel zur Kennzeichnung bestimmter Zustände benutzt werden kann. Ein Flag kann gesetzt, gelöscht oder ausgelesen werden. (de)
- En informatique, un drapeau ou fanion (flag en Anglais) est une valeur binaire (de type vrai ou faux) indiquant le résultat d'une opération ou le statut d'un objet. (fr)
- Un flag (parola inglese che significa bandierina) in informatica è una variabile che può assumere solo due stati ("vero" o "falso", "on" e "off", "1" e "0", "acceso" e "spento") e che segnala, con il suo valore, se un dato evento si è verificato oppure no, o se il sistema è in un certo stato oppure no (vedi anche voce in Glossario informatico). (it)
- フラグとは、コンピュータまたはコンピュータ・プログラムで、処理の条件判定結果を保持するレジスタまたは変数のことを言う。レジスタについてはステータスレジスタともいう。 (ja)
- Flaga lub znacznik w informatyce odnosi się do jednego lub więcej bitów, które wykorzystywane są do przechowywania binarnej informacji, która posiada pewne znaczenie. Najczęściej flagi wykorzystywane są do kontrolowania wykonywanego przez procesor kodu. Mogą posiadać informacje takie jak znak wyniku operacji (dodatni lub ujemny) czy też parzystość jego bitów. (pl)
- Em informática, uma flag (bandeira, em português) é um mecanismo lógico que funciona como semáforo: uma entidade (objecto) detém como activa uma determinada flag se a característica associada a essa flag estiver presente. Em programação, a utilização de flags como interruptor (i.e., valores 0/1, ligado/desligado, activo/inactivo) permite optimizar as estruturas de dados, na medida em que basta apenas um bit para activar determinada característica. (pt)
|