Jump to content

Parse command-line arguments: Difference between revisions

m
→‎{{header|Phix}}: added pwa/p2js output
m (→‎{{header|Phix}}: notonline (no command_line() for a browser!))
m (→‎{{header|Phix}}: added pwa/p2js output)
Line 495:
{{libheader|Phix/basics}}
 
<!--<lang Phix>(notonlinephixonline)-->
<span style="color: #008080;">withoutwith</span> <span style="color: #008080;">js</span> <span style="color: #000080;font-style:italic;">-- (no command_line() in a browser!)javascript_semantics</span>
<span style="color: #004080;">sequence</span> <span style="color: #000000;">res</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">command_line</span><span style="color: #0000FF;">()</span>
<span style="color: #0000FF;">?</span><span style="color: #000000;">res</span>
Line 513:
> test nc -v -n -z -w 1 192.168.1.2 1-1000
{"C:\\Program Files (x86)\\Phix\\test.exe","C:\\Program Files (x86)\\Phix\\test.exe","nc","-v","-n","-z","-w","1","192.168.1.2","1-1000"}
</pre>
pwa/p2js: There is no real command line, you always get a length-2 {user-agent(here trimmed),href} pair:
<pre>
{"Mozilla/5.0 ...","file:///C:/Program%20Files%20(x86)/Phix/pwa/test.htm"}
</pre>
 
7,813

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.