Re: "Boolean" broken in Delphi 2007 ?



Remy Lebeau (TeamB) wrote:

WordBool and Boolean are not the same data type. Boolean is not compatible
with ActiveX.

I know, but I use late binding. In unit system, the variant manager expects
"boolean" in vartobool/varfrombool so it knows how to convert it right.

Anyway, I tried your suggestion. Passing a boolean as variant doesn't work.
Nor does typecasting Wordbool(true).


The only thing that definitely helps is moving the Round(zoom * screendpi)
out of the function call which is very unexpected and makes me believe
there's a rtl bug involved.

This works perfectly:

Y:=Round(zoom * screendpi) ;
x := 1;
o.testproc(x, Y, TRUE);


There's something very fishy about putting the "round" function inside the
function call. Occasionally my system throws the exception "out of present
range" which I've never had before. Maybe some CPU or FPU flag remains
set after the function call.








--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)
.



Relevant Pages

  • Re: Differences between VB6 and VB.Net causing problem
    ... Take note, I did not say a Boolean is 32 bits, I said True is 32 bits. ... they use -1 again when converting to a Long type. ... I have followed the suggestion of changing the booleans to Long, ... receive an error message "Function call on left hand side of ...
    (microsoft.public.vb.general.discussion)
  • Re: I can not stop save warning message when I click Close (x) botton or Alt+F4
    ... Application.DisplayAlerts just stops the application showing them AND it takes the default answer. ... If you can explain what you did with my suggestion, maybe we can help develop it further? ... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, ...
    (microsoft.public.excel)
  • Re: Boolean-Variable per default auf FALSE?
    ... kein Boolean, er kann einen beinhalten. ... Ja, genau das hat er auch, nämlich False oder True. ... Ein Variant kann alles mögliche, ... Select Case VarType ...
    (microsoft.public.de.vb)
  • Re: Detecting type of variable ?
    ... Debug program for Generic Boolean Operations. ... function HasBooleanValue(ParaVariable: variant): boolean; ... function GenericIsTrue(ParaVariable: variant): boolean; ... GeneralFalse: variant; ...
    (alt.comp.lang.borland-delphi)
  • Re: VariantBool, Bool, Int, False, And Not
    ... Function B1As Boolean ... CopyVariant b ... Sub CopyVariant(ByRef v As Variant) ...
    (microsoft.public.de.vb)