Hi Javier, 
you wrote:
>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
>]

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. 


>
>how can I sort it by name or by mail?

by name:
>> sort citas
== [["Javier Delgado" [EMAIL PROTECTED] 8:30 1-Dec-1999] ["Margarita
Masa" Margarita@closeup.
com.mx 8:30 4-Aug-1999] ["Pancho ...


by email:
>> sort/compare citas func [x y] [ (second x) < (second y) ]
== [["Javier Delgado" [EMAIL PROTECTED] 8:30 1-Dec-1999] ["Margarita
Masa" Margarita@closeup.
com.mx 8:30 4-Aug-1999] ["Pancho ...


>how can i print the value of, for example the time of the second record?
>

>> third second citas
== 8:30

>if i have have defined elsewhere:
>
>  Newperson: "Fulano de tal"
>  Newmail: [EMAIL PROTECTED]
>  Newhour: 10:50
>  newdate: 4/11/1999
>
> how i append the data?
>
>if i use:
>
>append citas [newperson newmail newhour newdate]
>
>it appends the variable names instead of the variable values!!!

append/only citas reduce [newperson newmail newhour newdate]

>> Newperson: "Fulano de tal"
== "Fulano de tal"
>> Newmail: [EMAIL PROTECTED]
== [EMAIL PROTECTED]
>> Newhour: 10:50
== 10:50
>> newdate: 4/11/1999
== 4-Nov-1999

>> append/only citas reduce [newperson newmail newhour newdate]
== [["Javier Delgado" [EMAIL PROTECTED] 8:30 1-Dec-1999] ["Margarita
Masa" Margarita@closeup.
com.mx 8:30 4-Aug-1999] ["Pancho ...

>> foreach record citas [print record]
Javier Delgado [EMAIL PROTECTED] 8:30 1-Dec-1999
Margarita Masa [EMAIL PROTECTED] 8:30 4-Aug-1999
Pancho lopez [EMAIL PROTECTED] 9:00 2-Dec-1999
Fulano de tal [EMAIL PROTECTED] 10:50 4-Nov-1999
>>


>
>but if i have defined the block with make block!,

I don't quite understand what you mean here

>it appends the values, 

how do you know that if ...

>but then if i print
>
>print [citas]
>
>it prints "citas" instead of the value of citas!!!

this is what it prints? Look:

>> print citas
Javier Delgado [EMAIL PROTECTED] 8:30 1-Dec-1999 Margarita Masa
[EMAIL PROTECTED] 8:30
 4-Aug-1999 Pancho lopez [EMAIL PROTECTED] 9:00 2-Dec-1999 Fulano de tal
[EMAIL PROTECTED] 10:50 4-N
ov-1999

>
>i am confussed !

This last point confuses me a bit as well. I'm not sure what you were doing
to have REBOL print citas/

Hope this helps,

Elan

Reply via email to