Get system command output: Difference between revisions

Added XPL0 example.
m (→‎{{header|Wren}}: Minor tidy)
(Added XPL0 example.)
 
(One intermediate revision by one other user not shown)
Line 1,408:
We use <code>#lang racket/base</code> to show which module system is in. It would be imported anyway if we use the larger <code>#lang racket</code>.
 
This demonstrates one function: <code>system</system></code>. It is the simplest of a family of commands in the <code>racket/system</code> collection.
 
See [http://docs.racket-lang.org/reference/subprocess.html?q=system#%28def._%28%28lib._racket%2Fsystem..rkt%29._system%29%29 documentation for <code>system</code> and friends].
Line 1,808:
vm.Free()
}</syntaxhighlight>
 
=={{header|XPL0}}==
Use a pipe on the command line to run this. For example: dir | syscmd
<syntaxhighlight lang "XPL0">int C;
repeat C:= ChIn(1);
if C>=^a & C<=^z then \lowercase letters to uppercase
C:= C & ~$20;
ChOut(0, C);
until C = $1A</syntaxhighlight>
 
=={{header|Yabasic}}==
295

edits