Your First Djazair Program
In this guide, we will write, structure, and run our very first program in Djazair.
Writing the Script
Create a file named hello.dz in your preferred editor. Paste the following line of code into it:
# Hello world in Djazair
print("Hello from Djazair!")
Running the Script
Invoke the Djazair interpreter pointing to the script file:
# Executing hello.dz
./build/bin/djazair hello.dz
You should see the output printed to the terminal console:
Hello from Djazair!
Interactive Expression Testing
Djazair also supports running inline code snippets without a file by utilizing the -c CLI command option:
djazair -c 'print("Inline: " + str(10 + 20))'
# Output => Inline: 30