FBWiki : KeyPgOpLessThanOrEqual

FBWiki :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Operator <= (Less than or Equal)


Compares an expression less than or equal to another expression

Syntax:


declare operator <= ( byref lhs as T, byref rhs as T ) as integer

Usage:
result = lhs <= rhs

Parameters:
lhs
The left-hand side expression to compare to.
rhs
The right-hand side expression to compare to.
T
Any pointer type.

Return Value:
Returns negative one (-1) if the left-hand side expression is less than or equal to the right-hand side expression, or zero (0) if greater than.

Description:
Operator <= (Less than or Equal) is a binary operator that compares an expression less than or equal to another expression and returns the result - a boolean value in the form of an Integer: negative one (-1) for true and zero (0) for false. The arguments are not modified in any way.

This operator can be overloaded to accept user-defined types as well.

Examples:
Operator > (Greater than) is complement to Operator <= (Less than or Equal), and is functionally identical when combined with Operator Not (Bit-wise Complement).

   If (69 <= 420) Then Print "(69 <= 420) is true."
   If Not (60 > 420) Then Print "not (420 > 69) is true."


Dialect Differences:

Differences from QB:

See also:

Back to Relational Operators
Back to Operators

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.0



sf.net phatcode