RosettaCodeData/Task/Command-line-arguments/Phix/command-line-arguments.phix
2016-12-05 23:44:36 +01:00

13 lines
337 B
Text

constant cmd = command_line()
?cmd
if cmd[1]=cmd[2] then
printf(1,"Compiled executable name: %s\n",{cmd[1]})
else
printf(1,"Interpreted (using %s) source name: %s\n",cmd[1..2])
end if
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