> For the complete documentation index, see [llms.txt](https://jmdash.gitbook.io/jmdash-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jmdash.gitbook.io/jmdash-docs/jmbasics/syntax101/calling-functions/other-libraries/jmdash-argument-handler.md).

# JMDash Argument Handler

The **JMDash Argument Handler** library is **JM-**'s way to handle arguments parsed at program's startup,\
and can be included in a **JM-** Project using: `#incd .jargh`&#x20;

If something isn't clear about the syntax shown below, we recommend you to check out the [examples category](/jmdash-docs/examples/code-examples.md)

## Syntax & Examples

`.jargh` : Common use cases, and syntax examples;

{% code lineNumbers="true" %}

```c
// Check if any arguments were passed on startup
#incd .jargh
bool areThereArguments;
arg.chk{>> areThereArguments};
```

{% endcode %}

{% code lineNumbers="true" %}

```c
// Store the argument/s in a variable
#incd .jargh
str firstArgument;
arg.store{<< [1] >> firstArgument};

// Usage example
if (firstArgument == "-h" || firstArgument == "--help") : {
    // Print available options
};
```

{% endcode %}

{% code lineNumbers="true" %}

```c
// Store the program's name (executable's)
#incd .jargh
str programName;
arg.store{<< [0] >> programName};
```

{% endcode %}
