Vote UpVote

Potential XE3 gotcha – dodgy old code vs. new TStream overloads

Delphi Haven – In XE3, TStream has acquired a number of new helper methods for Read and Write. Mostly these take the form of strongly-typed versions of Read, Write, ReadBuffer and WriteBuffer, called ReadData, WriteData, ReadBufferData and WriteBufferData respectively. These relieve you of the need to use SizeOf: var Flag: Boolean; MagicNum: Integer; begin Stream.ReadBufferData(Flag); if Flag then Stream.ReadBufferData(MagicNum); I think adding these methods was a small but good idea, and a much better one than the TBinaryReader/TBinaryWriter classes that were pointlessly added in XE (cf. IOUtils, ...
Favorite? Off-Topic? Chris Rolliston @ 2012-09-30 16:46


Visits: 1008
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Jeroen Pluimers
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)