Terminal control/Dimensions: Difference between revisions

Content added Content deleted
(→‎{{header|Ruby}}: Add curses.)
(→‎{{header|Forth}}: original was wrong as of gforth 0.7.0; + SwiftForth)
Line 88: Line 88:


=={{header|Forth}}==
=={{header|Forth}}==
{{works with|GNU Forth}}
{{works with|GNU Forth}} {{works with|SwiftForth}}


<lang forth>variable term-width
<lang forth>variable term-width
variable term-height
variable term-height


s" gforth" environment? [if]
form ( width height ) term-height ! term-width !</lang>
2drop form ( height width )
[else] \ SwiftForth
get-size ( width height ) swap
[then]
term-width ! term-height !</lang>


=={{header|J}}==
=={{header|J}}==