Topics List
Basic Concepts

Variables
Variable Types

In Kenzie, there are six basic types of variables:
  1. nil: Represents the absence of a value or an uninitialized variable. It is commonly used to represent ''nothing'' or ''no value''. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  2. boolean: Represents a boolean value, either true or false. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  3. number: Represents a numerical value, either integer or floating point. Lua has a single numeric type for both integers and floats. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  4. string: Represents a sequence of characters enclosed in single or double quotes. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  5. function: Represents a callable piece of code. Functions in Lua are first-class citizens, meaning they can be assigned to variables, passed as arguments, and returned from other functions. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

  6. table: Represents a collection of key-value pairs. Tables are Lua´s sole composite data structure and can be used to represent arrays, dictionaries, objects, etc. For example:

    Copy Text (You can Paste it in your code using Ctrl-B o Ctrl-V)

These are the basic types in Kenzie and Lua. Each type has its own set of operations and behaviors, and Kenzie provides powerful mechanisms for working with them.
In Lua, there are two additional types of variables. Since Kenzie fully supports Lua, you can use these types in your code as well. Those additional types are:
  1. userdata: Represents an arbitrary block of memory managed by Lua. It is typically used to interface with C or other foreign languages.

  2. thread: Represents an independent thread of execution. Threads are used for concurrent programming in Lua.