Variables
Variable declaration looks like this:
We can specify type of variable like this:
Zero initialized variables (undefined)
To create "undefined" variable you need use undefined
keyword:
This code will allocate space in function stack for variable but doesn't initialize x
with some value.
Compile-time variables
Jazz allows you declare compile-time variable. You need use comptime
keyword before var
You can't assign to x
in non-compile-time context, you should use comptime
keyword before assignment:
Last updated