User:AJFarmar: Difference between revisions

 
Line 35:
dummy.w 0..2 #=>"Hello my deary,"
</lang>
 
===<code>clear</code>:===
This was a clear-screen function, mainly for IRB environment in the UNIX terminal. In fact, there's already a UNIX command, <code>clear</code> that clears your screen.
So, I tried this:
<lang ruby>
`clear` #=> "\e[H\e[2J"
</lang>
It was clearly an ANSI escape sequence. I did some more searching, and found her[[this wonderful page]].
Anonymous user