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

[REBOL] Re: Crippled reflection in Rebol?

From: hallvard:ystad:babelserver at: 26-Mar-2007 23:04

Dixit Arie van Wingerden (22.54 26.03.2007): [...]
> >> type? '/ > ** Syntax Error: Invalid word-lit -- ' > ** Near: (line 1) type? '/ >So, in Rebol "everybody is equal, but some are more equal than others"... >;-) >This way there is no consistency and retrieving such elementary properties >can be a pain. >Or, what very well might be the case, an I missing something obvious?
Guess this has got something to do with '/ being both a function and the start of a path...
>Another thing is that I tried to obtain the type for a rebol word which I >have stored in a string!; example: > >> x: "purple" > == "purple" >I found a way to obtain the type in a little bit awkward way: > >> do rejoin ["type? " x] > == tuple! >Is there an easier / better way to do it?
type? do x == tuple! Normally, I would want to LOAD the string, but since LOADing this string returns a WORD, DOing does just fine. It also works on other values:
>> g: "15"
== "15"
>> type? do g
== integer!
>> yy: to-string now
== "26-Mar-2007/23:01:35+2:00"
>> type? do yy
== date! Regards, HY