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

[REBOL] Re: A few questions about words

From: ryanc:iesco-dms at: 19-Oct-2000 10:54

This might help...
>> word1: "test"
== "test"
>> type? word1
== string!
>> word2: 'word1 ;this assigns word2 to the word word1 not its value
== word1
>> type? word2
== word!
>> word2
== word1
>> word3: word1 ;word1 is naturally evaluated to "test" then assigned
== "test"
>> type? word3
== string!
>> word3
== "test"
>> word4: :word1 ;this method takes the value of word1 without evaluation.
== "test"
>> type? word4
== string!
>> word1: "TTTTT"
== "TTTTT"
>> word4
== "test"
>> word3
== "test"
>>
Something else you should know...
>> p1: print
** Script Error: print is missing its value argument. ** Where: p1: print
>> p1: :print ;skips evaluation of print, just gets its value. >> p1 "me"
me
>>
--Ryan [eric--mccinc--com] wrote:
> I seem to be misunderstanding the use of words in rebol. > > say I had the following code > > word1: "This is a word" > word2: 'word1 > > is there any way using word2 to access and set the value of word1? It seems > to me that I should be able to. I guess what I am asking is if a function > is passed a variable name can us then use that to modify and access the > value. If I am completly off the mark on this one let me know. > > Thanks > Eric Merritt > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400 I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. -Einstein