This might help:
foreach [cond code][
series? [print "series" break]
number? [print "number"]
][if do reduce [cond value] code]
when value is a series or number.
Don't forget this either:
value: 'hello
switch type?/word value [integer! ["pants"] word! ["shirt"]]
;== "shirt"
Anton.
> Hello Rebols:
> ;; I would like to test the type of a value
> ;; or would agains a block of data types.
> ;; consider the console session below:
> >> test: [number! series! money! time! date! char!]
> == [number! series! money! time! date! char!]
> >> type? test/1
> == word!
> >> find test 'number!
> == [number! series! money! time! date! char!] ;; so far so good
> ;; Now test to see if the type of a value is in the 'test block
> >> find test (type? 2)
> == none ;; well, I would expect a hit here :(
>
> What notation do I need here to make a sucessful test.
> thanks!
> tim
>
> --
> Tim Johnson <[EMAIL PROTECTED]>
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.