5. Tutorials

This section provides hands-on tutorials organized into four groups:

  • Language Tutorials — learn daslang syntax and standard library features

  • C Integration Tutorials — embed daslang in a C host using the daScriptC.h API

  • C++ Integration Tutorials — embed daslang in a C++ host using the native daScript.h API

  • Macro Tutorials — write compile-time code transformations using the daslang macro system

5.1. Language Tutorials

These tutorials introduce daslang’s core features step by step. Each comes with a companion .das file in tutorials/language/ that you can run directly:

daslang.exe tutorials/language/01_hello_world.das

The tutorials are designed to be followed in order. Each one builds on concepts introduced in earlier tutorials.