Another Console Related Question
[1/4] from: paulporter:buffalotalks at: 29-Apr-2004 7:07
I've been playing with the console some more and discovered something that
is strange to me. When I type:
clear: print ["^L"]
and then type:
print clear
I get:
?unset?
>>
At the top of the page. I assume that Rebol wants me to set clear; so I try:
set 'clear print ["^L"]
but when I do:
print clear
I still get the ?unset?. So my question is what is the "?unset?" and how
do I set a value to "clear" in such a way that I don't get it?
All input appreciated.
Paul
--
Linux User Number: 348867
[2/4] from: apwing:zonnet:nl at: 29-Apr-2004 13:50
Hi Paul,
I think is has to do with the fact that CLEAR is a REBOL word. Have a look
at:
http://www.rebol.com/docs/words/wclear.html
Hope that helps,
Arie
[3/4] from: paulporter::buffalotalks::com at: 29-Apr-2004 9:33
Ah! thanks Arie. I tried to clear the console with "clear" and when it
didn't do what I wanted I started looking at other ways to do it. I did
think of it being a reserved word for some purpose other than clearing the
console.
I appreciate the input.
Paul
--
Linux User Number: 348867
[4/4] from: antonr:lexicon at: 30-Apr-2004 1:43
No, it should still work. Look:
>> clear: does [print "hello"]
>> clear
hello
Rebol allows you to freely change the value of
most words. I would advise against doing that
with clear, though; it's an often used function.
Also check out:
TUI Dialect - A dialect to print ASCII sequences in REBOL
http://www.rebolforces.com/articles/tui-dialect.html
which is a good tutorial on dialect creation as well as
containing escape sequences we can never remember.
The dialect implements 'clear as a command.
Of course, safely in the dialect, it does not affect
the built-in, globally defined, clear function.
Anton.