X hits on this document

789 views

0 shares

0 downloads

0 comments

162 / 396

Chapter ‎18   Unsafe code

x < y

true if x is less than y, false otherwise

x > y

true if x is greater than y, false otherwise

x <= y

true if x is less than or equal to y, false otherwise

x >= y

true if x is greater than or equal to y, false otherwise

7.9.1 Integer comparison operators

The predefined integer comparison operators are:

bool operator ==(int x, int y); bool operator ==(uint x, uint y); bool operator ==(long x, long y); bool operator ==(ulong x, ulong y);

bool operator !=(int x, int y); bool operator !=(uint x, uint y); bool operator !=(long x, long y); bool operator !=(ulong x, ulong y);

bool operator <(int x, int y); bool operator <(uint x, uint y); bool operator <(long x, long y); bool operator <(ulong x, ulong y);

bool operator >(int x, int y); bool operator >(uint x, uint y); bool operator >(long x, long y); bool operator >(ulong x, ulong y);

bool operator <=(int x, int y); bool operator <=(uint x, uint y); bool operator <=(long x, long y); bool operator <=(ulong x, ulong y);

bool operator >=(int x, int y); bool operator >=(uint x, uint y); bool operator >=(long x, long y); bool operator >=(ulong x, ulong y);

Each of these operators compares the numeric values of the two integer operands and returns a bool value that indicates whether the particular relation is true or false.

7.9.2 Floating-point comparison operators

The predefined floating-point comparison operators are:

bool operator ==(float x, float y); bool operator ==(double x, double y);

bool operator !=(float x, float y); bool operator !=(double x, double y);

bool operator <(float x, float y); bool operator <(double x, double y);

bool operator >(float x, float y); bool operator >(double x, double y);

Copyright Microsoft Corporation 1999-2003. All Rights Reserved.149

Document info
Document views789
Page views789
Page last viewedSat Dec 03 19:53:48 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments