Execute a system command: Difference between revisions
Content added Content deleted
(Add a Mercury version.) |
|||
Line 590: | Line 590: | ||
0 |
0 |
||
</lang> |
</lang> |
||
=={{header|Mercury}}== |
|||
<lang> |
|||
:- module execute_sys_cmd. |
|||
:- interface. |
|||
:- import_module io. |
|||
:- pred main(io::di, io::uo) is det. |
|||
:- implementation. |
|||
main(!IO) :- |
|||
io.call_system("ls", _Result, !IO). |
|||
</lang> |
|||
=={{header|Modula-2}}== |
=={{header|Modula-2}}== |