> 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/argument-handling.md).

# Argument Handling

If you want to know more about **JM-**'s Argument Handling, I recommend you to read the page(s) on the, [PIDD R1](/jmdash-docs/design-documents/the-pidds-first-revision.md) and the [functions it introduced](/jmdash-docs/jmbasics/syntax101/calling-functions/other-libraries/jmdash-argument-handler.md).

## Syntax & Examples

This is a copy of the syntax examples available [\[here\]](/jmdash-docs/jmbasics/syntax101/calling-functions/other-libraries/jmdash-argument-handler.md)

`.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 %}
