• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • next /
      • Expressions /
      • Relational Expressions
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Tangled Expression

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Bitwise Expression

      • Relational Expressions

      • Convert Or Cast Expression

      • F-String Expression

      • Member Access Expression

      • Function Call Expression

      • Lambda Expression

      • Matches Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Interfaces

    • Classes

    • Comments

    • Built-in Functions

      • Overview

      • Compiler Setup

        • Overview

          • index

          • compiler

          • errors

          • logger

          • utils

          • config

          • index

          • index

        • Overview

        • new

        • run

        • compile

        • help

        • version

      • next /
      • Expressions /
      • Relational Expressions
    • next /
    • Expressions /
    • Relational Expressions

    Edit page

    Relational Expressions (Comparisons)

    Relational expressions are comparative expressions that compare two other expressions/values with a specific operator. They evaluate to true if the condition of the operator is true, for example < (less than) with 1 < 5, and evaluate to false if the condition is false, for example > (greater than) with 1 > 5.

    Such expressions are essential for conditional expressions that are used in statements such as:

    • If-statements
    • While-loops
    • Do-while-loops
    • For-loops

    Syntax

    EXP ( == | != | > | >= | < | <= ) EXP

    Examples

    Equal-to Operator

    20 == 20; // -> true
    92 == 20; // -> false

    Not Equal-to Operator

    21 != 9; // -> true
    21 != 21; // -> false

    Greater-than Operator

    20 > 5; // -> true
    20 > 20; // -> false

    Greater-than or Equal-to Operator

    11 >= 5; // -> true
    20 >= 20; // -> true
    32 >= 99; // -> false

    Less-than Operator

    10 < 78; // -> true
    43 < 14; // -> false

    Less-than or Equal-to Operator

    12 <= 29; // -> true
    56 <= 56; // -> true
    21 <= 13; // -> false
  • Developed at:

    • Releases
    • GitHub
    • Security
    • Issue Tracker
    • License
  • Copyright © 2021-2025 Luna Klatzer, 2024-2025 Lorenz Holzbauer & Fabian Baitura.
    Kipper is licensed under the GPL-3.0-or-later license.