0

QBASIC have some commands, such as LOCATE (x, y) that place the cursor at certain location on the screen, and CLS that clears the screen, which help a console application look clean.

Does ruby have the same functionality? It could be nice to use it for a small project.

Thanks for helping

Richard77
  • 20,343
  • 46
  • 150
  • 252
  • You don't really want to do this - there is no cross-platform solutions for the problem and unless you are developing some console UI for real application there is no practical use. – iced Sep 21 '12 at 04:57
  • That shouldn't be a problem. In fact, it's just a class project and ruby is something we're learning. We don't want to spend to much time with a GUI library. That's why I asked about that functionnality because it makes the screen cleaner. – Richard77 Sep 21 '12 at 13:09

2 Answers2

1

No, but look up ncurses. http://ncurses-ruby.berlios.de/

Satya
  • 4,458
  • 21
  • 29
  • In the link you provided, they are talking about C, Linux,.. I've a laptop running on Windows. Is the library still gonna work? – Richard77 Sep 21 '12 at 04:35
  • Don't know, but try this link http://roguebasin.roguelikedevelopment.org/index.php/Ruby#ncurses-ruby – Satya Sep 21 '12 at 04:38
1

You can clear the screen with system "clear", and print the whole screen each time.

sawa
  • 165,429
  • 45
  • 277
  • 381