summaryrefslogtreecommitdiffstats
path: root/docs/user-guide
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user-guide')
-rw-r--r--docs/user-guide/02-conventional-features.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md
index aaeea4114..5c15986f8 100644
--- a/docs/user-guide/02-conventional-features.md
+++ b/docs/user-guide/02-conventional-features.md
@@ -435,6 +435,12 @@ Slang supports the following statement forms with nearly identical syntax to HLS
* `return` statements
+* `defer` statements
+
+> #### Note ####
+> The `defer` statement in Slang is tied to scope. The deferred statement runs at the end of the scope like in Swift, not just at the end of the function like in Go.
+> `defer` supports but does not require block statements: both `defer f();` and `defer { f(); g(); }` are legal.
+
> #### Note ####
> Slang does not support the C/C++ `goto` keyword.