# option - [Overview](#section1520105783165637) - [Summary](#section394430251165637) - [Data Fields](#pub-attribs) - [Details](#section903750371165637) - [Field](#section657119121165637) - [flag](#ab366eea5fe7be25c1928328ba715e353) - [has\_arg](#a90d7ee9a51eea5c002682dbd0af149e4) - [name](#adc503659d37af8017fb4b86d61c99086) - [val](#a13bd155ec3b405d29c41ab8d0793be11) ## **Overview** **Related Modules:** [UTILS](UTILS.md) **Description:** Defines the command parsing option. ## **Summary** ## Data Fields

Variable Name

Description

name

const char *

has_arg

int

flag

int *

val

int

## **Details** ## **Field ** ## flag ``` int* option::flag ``` **Description:** Determines the returned value of the **[getopt\(\)](UTILS.md#ga5ffa4c677fc71cecd94f140ef9db624c)** function. If **flag** is **NULL**, the **[getopt\(\)](UTILS.md#ga5ffa4c677fc71cecd94f140ef9db624c)** function returns the **val** value that matches the option. If **flag** is not **NULL**, assign the **val** value to the memory to which **flag** points, and set the returned value to **0**. ## has\_arg ``` int option::has_arg ``` **Description:** **has\_arg** has three values. **0** indicates that the argument is not followed by an argument value, **1** indicates that the argument must be followed by an argument value, and **2** indicates that the argument can be followed or not followed by an argument value. ## name ``` const char* option::name ``` **Description:** Long argument name ## val ``` int option::val ``` **Description:** The returned value is determined by **flag**.