~
directories
files
- grammar
- string
- struct
- index
- array_view
- while_loop
- types
- union
- for_loop
- namespace
- ifx
- if_case
- fixed_array
- resizable_array
- using
Before we get started, know that jai knows about jai, and we can use jai to compile our program written in jai. This is different from c++ where you have to use an external build tool to compile.
Compile time is the phase when source code is translated into executable code by a compiler. During this stage, syntax errors, type errors, and other issues that can be detected without running the program are identified and reported.
Note that compile time is the time before compilation is complete.
Run time is the phase when a program is executed after it has been successfully compiled. During this stage, the program performs its intended tasks, and errors related to logic, input, or system resources may occur.
Additionally we can specify code we'd like to run at compile time.
A given value satisfies is_constant iff it's value during runtime is always the same.
Executes the following expression at compile time. Note that the result of any #run expression satisfies is_constant
Given a string it directly puts it into the code before compilation.
Suppose we have defined a struct called My_Struct. If we instantiate a variable that holds a struct like this v : My_Struct. Then if you do typeof(v) the type will be My_Struct, whereas typeof(My_Struct) is Type. Interestingly this would mean that type_of(type_of(v)) is Type instead of My_Struct, which is what you might expect
Note that you must create a window before interacting with any opengl functions.
if var == {
case valA;
..;
case valB;
..;
case; // default case
..;