[Suggestion] Explicit vs Implicit typecasting

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Frédéric Libaud
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 16.10.2017, 13:51

[Suggestion] Explicit vs Implicit typecasting

Postby Frédéric Libaud » 16.10.2017, 14:02

Hi,

I use the 7.1.x release of Zeoslib and I've saw that there's some difficulties to compile the source with CodeTyphon (Typhon - V6.x) based on FPC 3.x. and Lazarus. Because some instructions contains implicit typecasting.

The best way is to make explicit typecasting with the key word as like :

HashMap.FKeys := (FKeys.Clone as IZCollection);
HashMap.FReadOnlyKeys := (FReadOnlyKeys.Clone as IZCollection);
HashMap.FValues := (FValues.Clone as IZCollection);
HashMap.FReadOnlyValues := (FReadOnlyValues.Clone as IZCollection);

than :

HashMap.FKeys := IZCollection(FKeys.Clone);
HashMap.FReadOnlyKeys := IZCollection(FReadOnlyKeys.Clone);
HashMap.FValues := IZCollection(FValues.Clone);
HashMap.FReadOnlyValues := IZCollection(FReadOnlyValues.Clone);

In ZCollections.pas.

Thank's.

Frédéric Libaud

miab3
Zeos Test Team
Zeos Test Team
Posts: 913
Joined: 11.05.2012, 12:32
Location: Poland

Re: [Suggestion] Explicit vs Implicit typecasting

Postby miab3 » 17.10.2017, 15:54

@ Frédéric Libaud

From what I know CodeTyphon(6.20) uses its own adaptation of ZEOS 7.2.x:

- Update pl_ZeosDBO to Ver 6.2.1 Source SVN Rev 3998

Why are you trying to compile an older one?

Michal


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: No registered users and 1 guest