From: Jeroen v. d. Z. <je...@fo...> - 2007-03-24 14:20:42
|
On Friday 23 March 2007 23:42, you wrote: > I'm beginning to look at the changes from FOX 1.6 to 1.7, and it > appears that for a number of functions, you're switching back to an > FXbool return type (as opposed to a bool return type). The canFocus() > method is one such case, but I have the feeling there are more. What's > the reason for switching back to the way it was in 1.4? > Its not *quite* back the way it was; now, FXbool is defined as "bool" which is the build-in C++ type. I decided against "bool" directly just in case I wanted to redefine it [for example, old compilers which don't have "bool" yet]. I don't really expect many such cases, however. Note that the built-in type bool [if you have it], has specific semantics which is different from just "a small integer"; in particular, values can be only false or true, and no 3rd value is allowed. Thus, its a bit easier to work with, since the compiler will replace anything that's non-zero by "true": FXbool truth=20; should set truth to "true"; in the old days, we would have had to write: FXbool truth=(20!=0); to guarantee that the value was either 0 or 1 and not something else. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 09:10 03/24/2007 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |