Terminal control/Dimensions: Difference between revisions

Content added Content deleted
(Added Arturo implementation)
(Changed the program to store the wisth and height in variables as required by the task.)
Line 507: Line 507:
<lang nim>import terminal
<lang nim>import terminal


echo "Terminal width: " & $terminalWidth()
let (width, height) = terminalSize()

echo "Terminal height: " & $terminalHeight()
echo "Terminal width: ", width
</lang>
echo "Terminal height: ", height</lang>

{{out}}
<pre>Terminal width: 80
Terminal height: 24</pre>


=={{header|OCaml}}==
=={{header|OCaml}}==