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

[REBOL] Re: to pair! bug

From: g:santilli:tiscalinet:it at: 21-Apr-2002 11:59

Hi Romano, On Sunday, April 21, 2002, 1:16:41 AM, you wrote: RPT> have you tryied all the datatypes? Pair and time are the only one? I didn't. But we can try: (hmm, got a crash; seems like TO does not like some datatypes... oh, maybe it was routine! let's avoid types we don't need to check)
>> str: ""
== ""
>> for ch #"^(00)" #"^(FE)" 1 [insert tail str ch]
== ""
>> datatypes: []
== []
>> foreach value second system/words [if datatype? get/any 'value [insert tail datatypes value]]
== none
>> print datatypes
unset error datatype native action routine op function object struct library port any-type any-word any-function number series any-string any-block symbol word set-word get-word lit-word refinement none logic integer decimal money time date char pair event tuple bitset string issue binary file email url image tag block paren path set-path lit-path hash list
>> problem: reduce [routine! struct! library! port! any-type! any-word! any-function! number! series! any-string! any-block! event! string!]
== [routine! struct! library! port! any-type! any-word! any-function! number! series! any-string! any-block! event! string!]
>> foreach datatype datatypes [prin [mold datatype ": "] either error? res: try [to datatype str] [print "Error."] [print ["Gives" type? :res]]]
unset! : Error. error! : Error. datatype! : Error. native! : Error. action! : Error. op! : Error. function! : Error. object! : Error. symbol! : Gives symbol word! : Gives word set-word! : Gives set-word get-word! : Gives get-word lit-word! : Gives lit-word refinement! : Gives refinement none! : Gives none logic! : Gives logic integer! : Error. decimal! : Error. money! : Error. time! : Gives none date! : Error. char! : Error. pair! : Gives none tuple! : Error. bitset! : Gives bitset issue! : Gives issue binary! : Gives binary file! : Gives file email! : Gives email url! : Gives url image! : Gives image tag! : Gives tag block! : Gives block paren! : Gives paren path! : Gives path set-path! : Gives set-path lit-path! : Gives lit-path hash! : Gives hash list! : Error. To notice: time! : Gives none pair! : Gives none And: list! : Error. while other block types did work (but returned an empty series, maybe because confused by the null character). Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r