Thanks Elan. So stupid of me I didn't think about that ;-( chr== > -----Original Message----- > From: Elan [SMTP:[EMAIL PROTECTED]] > Sent: maandag 15 januari 2001 20:05 > To: [EMAIL PROTECTED] > Subject: [REBOL] Re: How to check validity of types ? > > Hi Christian, > > the reason you get this behavior is that the words in the block, > [integer! string!], are not bound to the REBOL global context. Simply > say > > b: reduce [integer! string!] > > and that will do the trick. When you reduce the block REBOL binds the > words to the global context and now integer! = first b == true, and > string! = second b == true as well. > > > Hope this helps, > > Elan > > > "CRS - Psy Sel/SPO, COUSSEMENT Christophe, CPN" wrote: > > > > Hi REBOLs, > > > > I would like to check if a provided value meets pre-defined type > > requirements... > > > > So I define the valid types into a block 'b: > > > > >> b: [integer! string!] > > == [integer! string!] > > >> first b > > == integer! > > >> value: make integer! 1 > > == 1 > > >> type? value > > == integer! > > > > And I check the requirement: > > > > >> (type? value) = first b > > == false > > > > Of course the assumed answer was 'right... > > > > What did I wrong ? Is there another way to get what I want ? Any idea, > > suggestion ? > > > > thx a lot for answering > > CU, chr== > > > > -- > > To unsubscribe from this list, please send an email to > > [EMAIL PROTECTED] with "unsubscribe" in the > > subject, without the quotes. > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
[REBOL] Re: How to check validity of types ?
CRS - Psy Sel/SPO, COUSSEMENT Christophe, CPN Tue, 16 Jan 2001 00:17:51 -0800
