6
votes
Vote UpVote

TInteger

The Programming Works – Since the introduction of operator overloading in Delphi one can easily define custom data types that support arithmetic operations. For example it is quite easy to implement arithmetic of complex numbers like this: type PComplex = ^TComplex; TComplex = record Re, Im: Extended; class operator Implicit(const A: Extended): TComplex; class operator Add(const A, B: TComplex): TksComplex; class operator Subtract(const A, B: TComplex): TComplex; class operator Multiply(const A, B: TComplex): TComplex; {...} Note that TComplex is a static type with fixed data size (Re, Im ...
Favorite? Off-Topic? Serg @ 2011-02-01 10:34

Statistics

Visits: 985
Votes: 6
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Charles Ardour
Jørn E. Angeltveit
ket555
LachlanG
NickHodges
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

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