Terminal control/Dimensions: Difference between revisions
Content added Content deleted
(Added solution for Action!) |
|||
Line 104: | Line 104: | ||
Program normal end. |
Program normal end. |
||
</pre> |
</pre> |
||
=={{header|Action!}}== |
|||
<lang Action!>PROC Main() |
|||
BYTE ROWCRS=$0054 ;Current cursor row |
|||
CARD COLCRS=$0055 ;Current cursor column |
|||
CARD width |
|||
BYTE height |
|||
Graphics(0) |
|||
Position(0,0) ;go to the top-left corner |
|||
Put(28) Put(30) ;go up and left - the bottom-right corner |
|||
width=COLCRS+1 |
|||
height=ROWCRS+1 |
|||
Position(2,1) |
|||
PrintF("Number of colums: %U%E",width) |
|||
PrintF("Number of rows: %B%E",height) |
|||
RETURN</lang> |
|||
{{out}} |
|||
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Terminal_control_dimensions.png Screenshot from Atari 8-bit computer] |
|||
<pre> |
|||
Number of colums: 40 |
|||
Number of rows: 24 |
|||
</pre> |
|||
=={{header|Applesoft BASIC}}== |
=={{header|Applesoft BASIC}}== |
||
<lang ApplesoftBasic>WIDTH = PEEK(33) |
<lang ApplesoftBasic>WIDTH = PEEK(33) |