• Kipper

    v0.12.1
  • Downloads

  • Docs

  • Playground

  • Changelog

  • Kipper

    v0.12.1
    • Downloads

    • Docs

    • Playground

    • Changelog

      • 0.10.4 /
      • Hidden Page
    Kipper Docs
    • next
    • latest
    • 0.11.0
    • 0.10.4
    • 0.9.2
    • Overview

    • Quickstart

    • Goals for Kipper

    • Supported platforms

    • Usage Examples

      • Overview

      • Compiler Setup

    • Variables

      • Overview

      • String Type

      • Number Type

      • Boolean Type

      • Void Type

      • Null Type

      • Undefined Type

      • Array Type

      • Overview

      • Arithmetic Expression

      • Assignment Expression

      • Conditional Expressions

      • Logical Expressions

      • Relational Expressions

      • Convert Or Cast Expression

      • Function Call Expression

      • Overview

      • Expression Statement

      • If Statement

      • While Loop

      • Do-While Loop

      • For Loop

      • Compound Statement

      • Jump Statement

    • Functions

    • Comments

    • Built-in Functions

      • 0.10.4 /
      • Hidden Page
    • 0.10.4 /
    • Hidden Page

    Edit page

    Function Type - func

    The function type is a special type that represents a function. It is used to define functions and to call functions by storing them in variables.

    The function type is at the moment only half implemented, meaning that it is not possible to pass generic arguments to specify the type, nor is it possible to call the function stored. This will be added in a future release, though the syntax is already defined.

    Examples

    Storing a simple function

    def func1() -> void {
        return;
    }
    
    var storedRef = func1;

    Storing a built-in function

    var storedRef = print;

    X Calling a function reference

    def func2() -> void {
        return;
    }
    
    var storedRef = func2;
    func2(); // Not possible at the current version
  • 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.