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

[REBOL] Re: [REBOL][logic!] another bug ?

From: carl:cybercraft at: 23-Jul-2004 22:35

>Hi list, > >As I was converting XML data to REBOL datatypes, I struggeled on this one: > >REBOL/View 1.2.10.3.1 6-Aug-2003 >Copyright 2000-2003 REBOL Technologies. All rights reserved. >REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM > >>> to-logic "true" >== true ;==> ok >>> to-logic "false" >== true ;==> yerk >>> make logic! "false" >== true ;==> yerk again >>> to-logic 'false >== true ;==> etc... > >If it isn't a bug, what's the point of 'to-logic, other than: > >>> to-logic 1 >== true >>> to-logic 0 >== false
I don't think it's a bug, just that most values are true, such as strings, even when empty or containing "false". It's getting the logic of the value, not converting it. With 0 being an exception to this rule, obviously...
>> either 0 ["0 is true!"]["0 is false!"]
== "0 is true!"