Terminal control/Dimensions: Difference between revisions

Content added Content deleted
(Add BaCon)
Line 62: Line 62:
<lang bbcbasic> dx% = @vdu.tr%-@vdu.tl% : REM Width of text viewport in pixels
<lang bbcbasic> dx% = @vdu.tr%-@vdu.tl% : REM Width of text viewport in pixels
dy% = @vdu.tb%-@vdu.tt% : REM Height of text viewport in pixels</lang>
dy% = @vdu.tb%-@vdu.tt% : REM Height of text viewport in pixels</lang>
{{works with|all BBC BASIC}}
<lang bbcbasic> PRINT:VDU 8:dx%=POS+1:PRINT : REM Width of text viewport in characters
REPEAT:dy%=VPOS:PRINT:UNTIL VPOS=dy%:dy%=dy%+1 : REM Height of text viewport in characters</lang>
This has the side effect of scrolling the viewport up one line.
{{works with|BBC BASIC where VDU() is supported}}
<lang bbcbasic> dx% = VDU(10)-VDU(8)+1 : REM Width of text viewport in characters
dy% = VDU(9)-VDU(11)+1 : REM Height of text viewport in characters</lang>
This has the side effect of scrolling the viewport up one line.


=={{header|C}}==
=={{header|C}}==