Category:Curses: Difference between revisions

Content added Content deleted
(Create category for curses. It now contains 2 examples for Ruby. Describe curses, list 4 implementations, link to old Category:ncurses, and give brief instructions for C or Ruby.)
 
m (This might format better.)
Line 11: Line 11:
Curses is terminal-independent, and uses ''termcap'' or ''terminfo'' to send escape sequences to different flavors of terminals. (The exception is PDCurses, which never sends escape sequences, because it uses a DOS console or a graphical interface.)
Curses is terminal-independent, and uses ''termcap'' or ''terminfo'' to send escape sequences to different flavors of terminals. (The exception is PDCurses, which never sends escape sequences, because it uses a DOS console or a graphical interface.)


* '''C''' <lang c>#include <curses.h></lang> Then link the program with <code>-lcurses</code>. (Some old or strange systems might need <code>-lcurses -ltermlib</code>.)
== C ==
<lang c>#include <curses.h></lang>
* '''Ruby''' <lang ruby>require 'curses'</lang>

Then link the program with <code>-lcurses</code>. (Some old or strange systems might need <code>-lcurses -ltermlib</code>.)

== Ruby ==
<lang ruby>require 'curses'</lang>