Command-line arguments: Difference between revisions

Content added Content deleted
(Undo revision 101089 by 94.173.218.242 (talk) Removed comment( best suited to talk page)?)
No edit summary
Line 349: Line 349:
5> init:get_argument(c).
5> init:get_argument(c).
{ok,[["alpha beta"]]}</lang>
{ok,[["alpha beta"]]}</lang>

=={{header|Euphoria}}==
<lang Euphoria>constant cmd = command_line()
printf(1,"Interpreter/executable name: %s\n",{cmd[1]})
printf(1,"Program file name: %s\n",{cmd[2]})
if length(cmd)>2 then
puts(1,"Command line arguments:\n")
for i = 3 to length(cmd) do
printf(1,"#%d : %s\n",{i,cmd[i]})
end for
end if</lang>

=={{header|F_Sharp|F#}}==
=={{header|F_Sharp|F#}}==
The entry-point function accepts the comment line arguments as an array of strings. The following program will print each argument on a separate line.
The entry-point function accepts the comment line arguments as an array of strings. The following program will print each argument on a separate line.