a:"ed"
b:"a"
c:"b"
>> do do c
== ed
Is there a way to determine the depth of indirection such as f of c = 2?

[EMAIL PROTECTED] wrote:
> 
> Hola Javier,
> 
> Words: There are three possible states for words:
> 1. literal word
> 2. word bound to value
> 3. word not bound to value
> 
> 1. and 2. REBOL accepts. 3. causes an error:
> 
> re 1. The tick can be used to create a literal word
> >> print 'literal-word
> literal-word
> >>
> 
> re 2. word bound to a value:
> >> word-with-value: "this word's value."
> == "this word's value."
> >> print word-with-value
> this word's value.
> 
> re 3. Word that is not bound to a value and is not a literal word:
> >> print word-no-value
> ** Script Error: word-no-value has no value.
> ** Where: print word-no-value
> 
> Now, when you have a word in a block [ some-word ], then to REBOL that
> word, as long as it is part of the block, is a liter word, not a bound word:
> 
> >> print first [some-word]
> some-word
> 
> See how REBOL does not complain - as it did for word-no-value - but instead
> acts as it did with literal word.
> 
> Therefore, when you have a construct like
> 
> insert block [variable1 variable2 variable3]
> 
> what is inserted are the literal words variable1 variabl2 and variabl3.
> 
> If you want to use a block AND you want the values, not the literal words,
> you must use the word reduce:
> 
> insert block reduce [variable1 variable2 variable3]
> 
> What reduce does is it takes every literal word in the block, evaluates it
> as a word with value and returns a block, where is word has been replaced
> by its value:
> 
> Example:
> 
> >> variable1: "this is variable1."
> == "this is variable1."
> >> variable2: "this is variable2."
> == "this is variable2."
> >> variable3: "this is variable3."
> == "this is variable3."
> 
> >> variable-block: [variable1 variable2 variable3]
> == [variable1 variable2 variable3]
> 
> ;- No reduce
> >> variable-block
> == [variable1 variable2 variable3]
> 
> ;- With reduce
> >> reduce variable-block
> == ["this is variable1." "this is variable2." "this is variable3."]
> 
> Note that print automatically reduces blocks.
> 
> Hope this helps,
> 
> Elan
> 
> At 03:00 AM 12/14/99 -0600, you wrote:
> >Hola [EMAIL PROTECTED]
> >
> >El 13-Dec-99, usted escribio:
> >
> >> Try
> >>>> citas: [
> >> [    ["Javier Delgado"  [EMAIL PROTECTED]     8:30 1/12/1999]
> >> [    ["Pancho lopez"    [EMAIL PROTECTED]            9:00 2/12/1999]
> >> [    ["Margarita Masa"  [EMAIL PROTECTED]  8:30  4/08/1999]
> >> [    ]
> >
> >> Note that I've embedded each record in its own block.
> >
> >that makes sense, but why the examples in the rebol page are
> >organizend the other way?
> >
> >>>> sort citas
> >> == [["Javier Delgado" [EMAIL PROTECTED] 8:30 1-Dec-1999] ["Margarita
> >> Masa" Margarita@closeup.
> >
> >ok, I new there should be an easy way, thanks :))
> >
> >>>> third second citas
> >> == 8:30
> >
> >humm, beautifull :))
> >
> >>> but if i have defined the block with make block!,
> >> I don't quite understand what you mean here
> >I had tried to define citas as:
> > citas:  make block! [varible1 variable2... etc]
> >
> >when i do that a declaration like:
> >insert citas  [variable1 variable2 varible3.. etc]
> >would insert the vaible names, instead
> >of the variable values. There should be a
> >reason for that but i still cant figure why...
> >
> >
> >> this is what it prints? Look:
> >>>> print citas
> >
> >what is the diference between
> >print citas  and print [citas]
> >
> >if i define this with the make block! statement
> >there is a diference,
> >
> >> This last point confuses me a bit as well. I'm not sure what you were
> >> doing to have REBOL print citas/
> >
> >I just was trying to see the content of the variable,
> >I am writtin a cgi script,
> >the get method, mail and ftp were easy,
> >but i still ned more work to
> >understand blocks and series...
> >
> >i am spoiled with arexx where there is no
> >data types... :))
> >
> >Thank you very much, this is a very good start. :))
> >
> >Atentamente, Javier Delgado
> >--
> >Paralax Multimedia S.A.   Mexico D.F.
> >    http://www.paralax.com.mx
> >
> >Producción de Video, Video3d, animacion 3d  kioskos
> >tel/fax <5>373 36 20 , Calzada de las Armas16 Naucalpan
> >----------------------------------------------
> >Personal  http://www.paralax.com.mx/Javier
> >http://www.paralax.com.mx/Eyim
> >icq :   40740225  JavierD
> >
> >
> >
> >

Reply via email to