From 9c3e1b3c55c677206e6f70919f81484a7f0fe0c5 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Wed, 21 Jan 2026 16:40:19 +0000 Subject: Fix for #79 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 86018f7..aa773f4 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3