Terminal control/Dimensions: Difference between revisions

→‎{{header|Forth}}: original was wrong as of gforth 0.7.0; + SwiftForth
(→‎{{header|Ruby}}: Add curses.)
(→‎{{header|Forth}}: original was wrong as of gforth 0.7.0; + SwiftForth)
Line 88:
 
=={{header|Forth}}==
{{works with|GNU Forth}} {{works with|SwiftForth}}
 
<lang forth>variable term-width
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}}==
Anonymous user