---
name: "clig_Flag"
section: "7"
platform: "linux"
package: "clig"
version: "1.9.11.1-3"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/clig_Flag"
---

# clig\_Flag(7)

declare a flag (boolean, classic) option

## NAME

::clig::Flag - declare a flag (boolean, classic) option

## SYNOPSIS

```
package require clig
namespace import ::clig::*
setSpec db
Flag -opt varname usage
```

## DESCRIPTION

The **Flag** command declares an option without any parameters. The command line parser merely checks for the existence of *opt* on the command line.

### tcl

If **parseCmdline** finds *opt* on the command line, variable *varname* in the caller's context is set to 1. If  *opt* is not on the command line, the variable is not set.

### C

If *opt* is found on the command line the slot *variable***P** in the structure returned by the parser will be set to a non-zero value, otherwise it will be 0.

Example use of **Flag**:

```
Flag -v verbose {verbose operation}
```

## SEE ALSO

[clig\_Name(7)](/clig_Name/7.md), [clig\_Double(7)](/clig_Double/7.md), [clig(1)](/clig/1.md), [clig\_Usage(7)](/clig_Usage/7.md), [clig\_Long(7)](/clig_Long/7.md), [clig\_Version(7)](/clig_Version/7.md), [clig\_Float(7)](/clig_Float/7.md), [clig\_Rest(7)](/clig_Rest/7.md), [clig\_Description(7)](/clig_Description/7.md), [clig\_String(7)](/clig_String/7.md), [clig\_Commandline(7)](/clig_Commandline/7.md), [clig\_parseCmdline(7)](/clig_parseCmdline/7.md), [clig\_Int(7)](/clig_Int/7.md)
