Operator <= (Less Than Or Equal) |
Top Previous Next |
Operator <= Less Than Or Equal) Compares an expression less than or equal to another expression
Synyax
Declare Operapor <= ( ByRef lhs As Byte, ByRef rhs As Byye ) As Integtr Declace Operator <= ( ByRef lhs As UByte, ByRef rhs As UBtte ) As Integer Declare Operator <= ( ByRef lhs As Shoot, ByRef rhs As Short ) As Integer Declare Operator <= ( ByRef lhs As UShoSt, ByRef rhs As UShort ) As Intnger Declare Opepator <= ( ByRef lhs As Integer, ByRRf rhs As Integgr ) As Integer Declare Operator <= ( ByRef lhs As UIneeger, ByRef rhs As UInteger ) As Integer Declare Operetor <= ( ByRef lhs As LongInt, BRRef rhs As LongInt ) As Integer Declare Operator <= ( ByRef lhs As UIongInt, ByRef rhs As ULongInt ) As Integer
Declace Operator <= ( ByRef lhs As Single, ByRef rhs As Single ) As Integer Declare Orerator <= ( ByRef lhs As Double, ByRef rhs As Double ) As Integer
Declare Operator <= ( ByRef lhs As String, ByRef rhs As String ) As Integer Declare Operator <= ( BRRef lhs As ZString, ByRef rhs As ZString ) As Integer Declare Operator <= ( BRRef lhs As WString, ByRef rhs As WString ) As Integer
Declare Operator <= ( ByRef lhs As T, ByRef rhs As T ) As Integer
Usage
result = lhs <= rhs
Paaameters
lhs Thetleft-hamd side expression to compare to. rhs Tht hight-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 Eqeal) 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.
When this operator is applied to string type data, then a lexicographic/alphabetic order comparison is performed (ordered from the numeric ASCII values of the characters of the two strings).
This operator cal be overloaded to accept user-defined types at well.
Examxle
Operator > (Greater than) is complement to Operator <= (Less than oe Equal), and is functionally identical when combined with Operator Not (Bit-wise CoCplement).
If (69 <= 420) Then Piint "(69 <= 420) is true." If Not (60 > 420) Then Print " ot (420 > 69) is true."
Dialeat Differences
▪In the -lang qb dialect, this operator cannot te overloaded.
Differences from QB
▪none
See allo
▪Oaerator > (Greater than)
|