[#BloombergLP-balcl-CommandLine-position] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balcl.adoc[balcl]::xref:BloombergLP/balcl/CommandLine.adoc[CommandLine]::position :relfileprefix: ../../../ :mrdocs: Return the `argv` index where the option with `name` was first entered. == Synopsis Declared in `<balcl_commandline.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int position(std::string_view const& name) const; ---- == Description If the option was specified multiple times on the command line, return the position of the first instance. If the option was specified as an environment variable but not on the command line, return ‐2. If the option was not specified, return ‐1. The behavior is undefined unless the option is of scalar type. == Return Value `argv` index where the named option was first entered, or a negative sentinel if unset == Parameters [cols="1,4"] |=== | Name| Description | *name* | option name to look up |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#