Delphi 的运算符重载(2) - 可重载运算符列表

本文详细介绍了Delphi中的运算符重载,包括可重载运算符列表,如隐式和显式转换,以及各种比较、算术和位操作运算符,帮助开发者深入理解Delphi语言特性。
摘要由CSDN通过智能技术生成

Delphi 的运算符重载(2) - 可重载运算符列表

 类别 运算符运算符标识使用
转换隐式转换 ImplicitImplicit(a: type): resultType;
显式转换ExplicitExplicit(a: type): resultType;
一元-NegativeNegative(a: type): resultType;
+PositivePositive(a: type): resultType;
IncIncInc(a: type): resultType;
DecDecDec(a: type): resultType
notLogicalNotLogicalNot(a: type): resultType;
notBitwiseNotBitwiseNot(a: type): resultType;
TruncTruncTrunc(a: type): resultType;
RoundRoundRound(a: type): resultType;
比较=EqualEqual(a: type; b: type): Boolean;
<>NotEqualNotEqual(a: type; b: type): Boolean;
>GreaterThanGreaterThan(a: type; b: type) Boolean;
>=GreaterThanOrEqual GreaterThanOrEqual(a: type; b: type): resultType; 
<LessThanLessThan(a: type; b: type): resultType;
<=LessThanOrEqualLessThanOrEqual(a: type; b: type): resultType;
二元+AddAdd(a: type; b: type): resultType;
-SubtractSubtract(a: type; b: type): resultType;
*MultiplyMultiply(a: type; b: type): resultType;
/DivideDivide(a: type; b: type): resultType;
divIntDivideIntDivide(a: type; b: type): resultType;
modModulusModulus(a: type; b: type): resultType;
shlLeftShiftLeftShift(a: type; b: type): resultType;
shrRightShiftRightShift(a: type; b: type): resultType;
andLogicalAndLogicalAnd(a: type; b: type): resultType;
orLogicalOrLogicalOr(a: type; b: type): resultType;
xorLogicalXorLogicalXor(a: type; b: type): resultType;
andBitwiseAndBitwiseAnd(a: type; b: type): resultType;
orBitwiseOrBitwiseOr(a: type; b: type): resultType;
xorBitwiseXorBitwiseXor(a: type; b: type): resultType;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值