diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-21 16:40:19 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-21 16:40:19 +0000 |
| commit | 9c3e1b3c55c677206e6f70919f81484a7f0fe0c5 (patch) | |
| tree | ce63b0e071c2a7067e516de22585f3a29409ab5c /README.md | |
| parent | a1efe2cdde2237083ffff825f5b2dbb7442aa419 (diff) | |
Fix for #79
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -422,12 +422,14 @@ println "You are {age} years old."; Zen C allows manual memory management with ergonomic aids. #### Defer -Execute code when the current scope exits. +Execute code when the current scope exits. Defer statements are executed in LIFO (last-in, first-out) order. ```zc var f = fopen("file.txt", "r"); defer fclose(f); ``` +> To prevent undefined behavior, control flow statements (`return`, `break`, `continue`, `goto`) are **not allowed** inside a `defer` block. + #### Autofree Automatically free the variable when scope exits. ```zc |
