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

'alias command in REBOL

 [1/2] from: gmassar::dreamsoft::com at: 18-Jan-2001 8:50


As per REBOL dictionary, one states that in order to use aliases, use 'do command. E.g.
>> alias 'print "stampa" >> do {stampa "MONDO Rebol"}
MONDO Rebol Why 'do { ... } command? The curly brackets are supposed to be used for multi-lined strings. I tried to say:
>> stampa "MONDO Rebol"
MONDO Rebol Fine, but it does not work for file redirection. Exactly what is the difference if I say:
>> stampa: :print
instead of using 'alias command? What is the advantage between them? Would appreciate an educational explanation or even a hint. TIA Geo... still green in REBOL thingy

 [2/2] from: g:santilli:tiscalinet:it at: 18-Jan-2001 19:58


Hello Geo! On 18-Gen-01, you wrote: GM> Exactly what is the difference if I say: GM>>> stampa: :print GM> instead of using 'alias command? What is the advantage GM> between them? Alias makes "stampa" THE SAME WORD as "print"; it is a different spelling of the same word. With the above, you assing to the word 'stampa the value of the word 'print.
>> alias 'print "stampa"
== stampa
>> 'stampa = 'print
== true
>> alias 'part "not-completely"
== not-completely
>> copy/not-completely "something" 4
== "some" Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/