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

Routine support for logic! type?

 [1/3] from: massung::gmail::com at: 5-Apr-2006 21:34


So, I have a bunch of DLL functions which take and return booleans (logic!). But it doesn't appear as though REBOL has direct support for this [basic] datatype? I can use integer!, which works, but if I want to use the logic! type, I'd need to do to-integer when sending it to the routine, and to-logic when I get the return value back. Generally speaking, do most people do this? Is there a way to wrap this somehow so I don't need to, or am I missing something fundamental that will allow me to use the basic logic! datatype? Thanks! Jeff M. -- massung-gmail.com

 [2/3] from: Izkata::Comcast::net at: 6-Apr-2006 21:26


I don't know about how DLLs work, but in Rebol, boolean (true/false) values are called logic values

 [3/3] from: anton::wilddsl::net::au at: 7-Apr-2006 19:44


In C, booleans are usually mapped to int or char. You will have to figure out for each DLL what the boolean type is mapped to. (ie. find the typedef assignment deep in the headers somewhere, that's usually quite fun.. :) Anton.