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

[REBOL] Re: Rebol Enhancement Proposal - Embedding spaces in path! datatypes

From: cyphre:volny:cz at: 10-May-2001 17:55

Hello Joel ;)
> For example: > > >> now > == 10-May-2001/9:16:46-5:00 > >> now/time > == 9:16:49 > >> now/time/hour > ** Script Error: now has no refinement called hour > ** Where: halt-view > ** Near: now/time/hour > >> foo: now/time > == 9:16:57 > >> foo/hour > == 9 > > where NOW/TIME returns a TIME! value which has an /HOUR component. > However NOW/TIME/HOUR is interepted as asking NOW to apply two > refinements named /TIME *and* /HOUR. A nice usage of the paren! > type as a segment in a path would be > > (now/time)/hour > > which would avoid the need for another variable (e.g. FOO above) > just to get at the components of the function result. >
but can use folowing without needing any variable...
>> pick now/time 1
== 17
>> pick now/time 2
== 51
>> pick now/time 3
== 12
>>
or
>> first now/time
== 17
>> second now/time
== 51
>> third now/time
== 35
>>
have fun Cyphre