This program shows how to use the command_line_t derived type to check whether a command-line argument is present. Running this program as follows with the command should print an indication that the command-line argument is present:
fpm run --example check-for-command-line-argument -- --some-argument
Running the program without the argument or with the argument spelled differently should print an indication that the argument is not present:
fpm run --example check-for-command-line-argument
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
type(command_line_t) | :: | command_line |