<s>
Different	O
command-line	B-Language
argument	I-Language
parsing	I-Language
methods	O
are	O
used	O
by	O
different	O
programming	O
languages	O
to	O
parse	B-Language
command-line	O
arguments	O
.	O
</s>
<s>
C	B-Language
uses	O
argv	O
to	O
process	O
command-line	O
arguments	O
.	O
</s>
<s>
An	O
example	O
of	O
C	B-Language
argument	B-Language
parsing	I-Language
would	O
be	O
:	O
</s>
<s>
C	B-Language
also	O
has	O
functions	O
called	O
getopt	B-Library
and	O
getopt_long	O
.	O
</s>
<s>
An	O
example	O
of	O
Java	B-Language
argument	B-Language
parsing	I-Language
would	O
be	O
:	O
</s>
<s>
Here	O
are	O
some	O
possible	O
ways	O
to	O
print	O
arguments	O
in	O
Kotlin	B-Language
:	O
</s>
<s>
Perl	B-Language
uses	O
@ARGV	O
.	O
</s>
<s>
AWK	B-Application
uses	O
ARGV	O
also	O
.	O
</s>
<s>
PHP	B-Application
uses	O
argc	O
as	O
a	O
count	O
of	O
arguments	O
and	O
argv	O
as	O
an	O
array	B-Data_Structure
containing	O
the	O
values	O
of	O
the	O
arguments	O
.	O
</s>
<s>
To	O
create	O
an	O
array	B-Data_Structure
from	O
command-line	O
arguments	O
in	O
the	O
-foo:bar	O
format	O
,	O
the	O
following	O
might	O
be	O
used	O
:	O
</s>
<s>
PHP	B-Application
can	O
also	O
use	O
getopt( )	O
.	O
</s>
<s>
Python	B-Language
uses	O
sys.argv	O
,	O
e.g.	O
</s>
<s>
Python	B-Language
also	O
has	O
a	O
module	O
called	O
argparse	O
in	O
the	O
standard	O
library	O
for	O
parsing	B-Language
command-line	O
arguments	O
.	O
</s>
<s>
Racket	B-Operating_System
uses	O
a	O
current-command-line-arguments	O
parameter	O
,	O
and	O
provides	O
a	O
racket/cmdline	O
library	O
for	O
parsing	B-Language
these	O
arguments	O
.	O
</s>
<s>
The	O
library	O
parses	B-Language
long	O
and	O
short	O
flags	O
,	O
handles	O
arguments	O
,	O
allows	O
combining	O
short	O
flags	O
,	O
and	O
handles	O
-h	O
and	O
--help	O
automatically	O
:	O
</s>
<s>
Rexx	B-Language
uses	O
arg	O
,	O
e.g.	O
</s>
<s>
JavaScript	B-Language
programs	O
written	O
for	O
Node.js	B-Language
use	O
the	O
process.argv	O
global	O
variable	O
.	O
</s>
<s>
Node.js	B-Language
programs	O
are	O
invoked	O
by	O
running	O
the	O
interpreter	O
node	O
interpreter	O
with	O
a	O
given	O
file	O
,	O
so	O
the	O
first	O
two	O
arguments	O
will	O
be	O
node	O
and	O
the	O
name	O
of	O
the	O
JavaScript	B-Language
source	O
file	O
.	O
</s>
<s>
It	O
is	O
often	O
useful	O
to	O
extract	O
the	O
rest	O
of	O
the	O
arguments	O
by	O
slicing	O
a	O
sub-array	O
from	O
process.argv	O
.	O
</s>
