Terminal control/Dimensions: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 347:
set HEIGHT=`tput lines`
echo "The terminal is $WIDTH characters wide and has $HEIGHT lines."</lang>
 
=={{header|XPL0}}==
<lang XPL0>include c:\cxpl\codes;
int W, H;
[W:= Peek($40, $4A); \IBM-PC BIOS data
H:= Peek($40, $84) + 1;
Text(0, "Terminal width and height = ");
IntOut(0, W); ChOut(0, ^x); IntOut(0, H);
]</lang>
 
Output:
<pre>
80x25
</pre>
 
{{omit from|ACL2}}
772

edits