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

[REBOL] Re: I hate computers!

From: al:bri:xtra at: 5-Jan-2003 10:20

jn wrote:
> 1) Since pseudo-types (e.g., SERIES!) are simply identified by REBOL as
data types (not a distinct "pseudo-type" type), what is the best way to determine whether a value of type DATATYPE! is a "physical" type or a pseudo type?
>> Physical?: func [Datatype [datatype!]] [
[ attempt [make Datatype 0 true] [ ]
>> Physical? string!
== true
>> Physical? foo!
** Script Error: foo! has no value ** Near: Physical? foo!
>> Physical? series!
== none
>> Physical? number!
== none
>> Physical? function!
== none Basically trying to 'make the real value. Unfortunately, it doesn't work for 'function!, which requires two block! values and crashes Rebol when using a 0 value instead. Andrew Martin ICQ: 26227169