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

[REBOL] contexts and words Re:

From: larry:ecotope at: 11-Aug-2000 12:33

Hi Galt You wrote:
> Paths are a little weird, and so on... > You can't get to the parts of a path > as if it were a block.
Actually you can:
>> third 'a/b/c
== c or if the path is referenced by a word
>> p: 'a/b/c
== a/b/c
>> type? :p
== path!
>> third :p
== c or if the path is in a block
>> blk: ["string" a/b/c]
== ["string" a/b/c]
>> type? second blk
== path!
>> third second blk
== c The trick is to prevent evaluation of the path in the same fashion as with functions. Also you can convert between paths and blocks.
>> to-block :p
== [a b c]
>> to-path to-block :p
== a/b/c HTH -Larry