In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions
Moderators: gto , EgonHugeist
aagusti
Fresh Boarder
Posts: 1 Joined: 03.04.2012, 16:24
Contact:
Post
by aagusti » 03.04.2012, 16:55
We know VInteger defined as Int64 but after I search at Unit ZVariant.pas Starting at Line 1081 convertion for Vint From String and attach using Integer conversion
Code: Select all
vtInteger:
case Value.VType of
vtNull:
Result.VInteger := 0;
vtBoolean:
if Value.VBoolean then
Result.VInteger := 1
else Result.VInteger := 0;
vtInteger:
Result.VInteger := Value.VInteger;
vtFloat:
Result.VInteger := Trunc(Value.VFloat);
vtString:
Result.VInteger := StrToInt64Def(Value.VString, 0); //StrToIntDef(Value.VString, 0);
vtUnicodeString:
Result.VInteger := StrToInt64Def(Value.VUnicodeString, 0);//StrToIntDef(Value.VUnicodeString, 0);
vtDateTime:
Result.VInteger := Trunc(Value.VDateTime);
vtPointer:
Result.VInteger := Int64(Value.VPointer);//Integer(Value.VPointer);
vtInterface:
RaiseTypeMismatchError;
end;
CMIIW
mdaems
Zeos Project Manager
Posts: 2766 Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:
Post
by mdaems » 25.04.2012, 22:17
We know VInteger defined as Int64 but after I search at Unit ZVariant.pas Starting at Line 1081 convertion for Vint From String and attach using Integer conversion
Is this also true on 32 bit compilers? And isn't the conversion Integer() working correctly in 64 compilers?
Mark
EgonHugeist
Zeos Project Manager
Posts: 1936 Joined: 31.03.2011, 22:38
Post
by EgonHugeist » 25.04.2012, 22:26
Still done, Mark.
Don't know the Rev. anymore. In meanwhile this patch should be in the trunk too.
Michael
mdaems
Zeos Project Manager
Posts: 2766 Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:
Post
by mdaems » 25.04.2012, 23:33
Yes, but we're talking about the 6.6-patches branch here... Is it applicable there too?
Mark
EgonHugeist
Zeos Project Manager
Posts: 1936 Joined: 31.03.2011, 22:38
Post
by EgonHugeist » 25.04.2012, 23:44
Nope, you're right..
We need this in 6.6.6 too