Operator Overloading in Delphi (2)-List of operators that can be reloaded

Source: Internet
Author: User
Category Operator Operator ID Use
Conversion Implicit conversion Implicit Implicit (A: type): resulttype;
Explicit Conversion Explicit Explicit (A: type): resulttype;
RMB 1

-

Negative Negative (A: type): resulttype;

+

Positive Positive (A: type): resulttype;
INC INC INC (A: type): resulttype;
Dec Dec Dec (A: type): resulttype
Not Logicalnot Logicalnot (A: type): resulttype;
Not Bitwisenot Bitwisenot (A: type): resulttype;
Trunc Trunc Trunc (A: type): resulttype;
Round Round Round (A: type): resulttype;
Comparison

=

Equal Equal (A: type; B: type): Boolean;

<>

Notequal Notequal (A: type; B: type): Boolean;

>

Greaterthan Greaterthan (A: type; B: type) Boolean;

> =

Greaterthanorequal Greaterthanorequal (A: type; B: type ):
Resulttype;

<

Lessthan Lessthan (A: type; B: type): resulttype;

<=

Lessthanorequal Lessthanorequal (A: type; B: type ):
Resulttype;
Binary

+

Add Add (A: type; B: type): resulttype;

-

Subtract Subtract (A: type; B: type): resulttype;

*

Multiply Multiply (A: type; B: type): resulttype;

/

Divide Divide (A: type; B: type): resulttype;
Div Intdivide Intdivide (A: type; B: type): resulttype;
MoD Modulus Modulus (A: type; B: type): resulttype;
SHL Leftshift Leftshift (A: type; B: type): resulttype;
SHR Rightshift Rightshift (A: type; B: type): resulttype;
And Logicaland Logicaland (A: type; B: type): resulttype;
Or Logicalor Logicalor (A: type; B: type): resulttype;
XOR Logicalxor Logicalxor (A: type; B: type): resulttype;
And Bitwiseand Bitwiseand (A: type; B: type): resulttype;
Or Bitwiseor Bitwiseor (A: type; B: type): resulttype;
XOR Bitwisexor Bitwisexor (A: type; B: type): resulttype;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.