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
If something isn't clear about the syntax shown below, we recommend you to check out the examples category
Syntax & Examples
.jargh
: Common use cases, and syntax examples;
// Check if any arguments were passed on startup
#incd .jargh
bool areThereArguments;
arg.chk{>> areThereArguments};
// 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
};
// Store the program's name (executable's)
#incd .jargh
str programName;
arg.store{<< [0] >> programName};
Last updated
Was this helpful?