Repository navigation
Operator Less Than
Home › Operators › Operator < (Less Than)
Compares an expression less than another expression
Declare Operator < ( ByRef lhs As Byte, ByRef rhs As Byte ) As Integer
Declare Operator < ( ByRef lhs As UByte, ByRef rhs As UByte ) As Integer
Declare Operator < ( ByRef lhs As Short, ByRef rhs As Short ) As Integer
Declare Operator < ( ByRef lhs As UShort, ByRef rhs As UShort ) As Integer
Declare Operator < ( ByRef lhs As Integer, ByRef rhs As Integer ) As Integer
Declare Operator < ( ByRef lhs As UInteger, ByRef rhs As UInteger ) As Integer
Declare Operator < ( ByRef lhs As LongInt, ByRef rhs As LongInt ) As Integer
Declare Operator < ( ByRef lhs As ULongInt, ByRef rhs As ULongInt ) As IntegerlhsrhsT
Operator < (Less than) is a binary operator that compares two expressions for inequality 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 can be overloaded to accept user-defined types as well.
Returns negative one (-1) if the left-hand side expression is less than the right-hand side expression, or zero (0) if greater than or equal.
result = lhs < rhs
- In the -lang qb dialect, this operator cannot be overloaded.
- none
-
Operator >=(Greater than or equal)
Const size As Integer = 4
Dim array(size - 1) As Integer = { 1, 2, 3, 4 }
Dim index As Integer = 0
While (index < size)
Print array(index)
index += 1
WendOperator >= (Greater than or equal) is complement to Operator < (Less than), and is functionally identical when combined with Operator Not (Bit-wise Complement).
If (69 < 420) Then Print "(69 < 420) is true."
If Not (69 >= 420) Then Print "not (69 >= 420) is true."Category: Operators
Kind: operator
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- Partial Types
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing