-
Notifications
You must be signed in to change notification settings - Fork 81
Native types
Native types in Jai are defined in Type_Info_Tag enumeration in the Preload.jai file.
Everything defined in this file is automatically included by the compiler in every program.
The classic boolean type whose values can be true
or false
is defined using the bool
signature.
The default type of this category is int
and it is a 32 bit signed integer type. It is an alias to s32.
The variants for integral types are:
u8, u16, u32, u64 unsigned versions
Or:
s8, s16, s32, s64 signed versions
Each of them indicates the number of bits used for the internal representation in memory.
The default type in this category is float
and it is a 32-bit single-precision floating-point type. It is an alias to float32.
The double-precision version is named float64.
They are collections of numeric constants.
They are u64 values designated to handle the in-memory address of dynamically allocated variables.
They are u64 values designated to handle the in-memory address of the subroutine's entry points.
...
...
They are the simplest collection type and are meant to store a series of variables of the same type.
They are specialized array designated to handle a series of UTF8 16 bit characters.
They are data aggregation types that can store variables of different types together.
Any type can be used at runtime to handle different variables and manage code behavior accordingly with the variable's actual type.
An invalid undefined memory address.
The return type of the procedures or functions that don't return any value.
In Jai the type is a type itself and maps to a Type_Info struct.
...
These documents were verified using Grammarly free browser plugin for Chrome. Please use some spell checker before submitting new content.
- Variables and assignments
- Language data types
- Simple user-defined data types
- Expressions and operators
- Type-casting
- Pointers
- Declarations
- Arguments / Parameters
- Return values
- Overloading / Polymorhism
- Advanced features
- Lambdas
- Arrays
- Strings
- Composition of Structs
- Metaprogramming
- Templates / Generics