Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [subject: error and trial]

From: reboler:programmer at: 5-Mar-2002 12:41

How about a new value confusing? As in confusing? 'undefined? ==> true :) I think I'm starting to see the difference.
>> probe new-word
** Script Error: new-word has no value ** Where: halt-view ** Near: probe new-word
>> value? 'new-word
== false
>> undefined? 'new-word
== false Is this the answer you want for 'undefined? ? Seems that this should give 'true ? Or is this the usage, undefined? 'word ==>true means that it is defined but has no value ? (makes the word 'undefined? confusing!) While value? 'word ==> false means that it is not defined (and therefore cannot have a value) ? How does one define a new word but give it no value. I still can't wrap my mind around the following...
>> nn: none
== none
>> probe nn
none == none
>> value? 'nn
== true
>> undefined? 'nn
== false
>> unset 'nn >> value? 'nn
== false
>> undefined? 'nn
== false And how about the following. Doesn't your example just show a deficiency in using 'first?
>> set in rebol/words 'end! 1
== 1
>> probe end!
1 == 1
>> value? 'end!
== true
>> undefined? 'end!
== false
>> unset end! >> unset 'end! >> value? 'end
== false
>> undefined? 'end
== false Here is another example from a fresh console session, without using 'first.
>> undefined? (in rebol/words 'end!)
== false