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

[REBOL] Re: Global Words

From: lmecir:mbox:vol:cz at: 3-Jul-2002 9:23

Hi Ammon, in my opinion we should distinguish two different situations. The first one is, whether a given word exists in a given context. Example: in system/words first to block! "xxx" ; == none This tells us, that the word 'xxx doesn't exist in the Global context. Another example: o: make object! [a: 1 unset 'a] in o 'b ; == none This tells us, that 'b doesn't exist in the object. If we try 'a we get a different result: in o 'a ; == a On the other hand, if we want to know, whether 'a has got a value, we will find out: value? in o 'a ; == false , i.e. the word exists in the context, but it doesn't have a value. Hope it is of some use, -L Hi, It is a good thing that you corrected yourself, I would have let you know as I already attempted the "unset?" version with no luck! ;-) Glad to see that there is a function that will let me know if a word exists in a given context though. Thanks for the input. Oh, how valuable this list is. ;-) Thanks!! Ammon A short time ago, Ladislav Mecir, sent an email stating: