From 947a78df401685fadd5531e47e0e09a181cbb45d Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 12 Apr 2023 13:30:03 -0700 Subject: Update 02-conventional-features.md --- docs/user-guide/02-conventional-features.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md index a28b7f8cb..3f2f22b57 100644 --- a/docs/user-guide/02-conventional-features.md +++ b/docs/user-guide/02-conventional-features.md @@ -244,8 +244,9 @@ Slang supports the following expression forms with nearly identical syntax to HL * Operators: `-a`, `b + c`, `d++`, `e %= f` > #### Note #### -> Like HLSL but unlike most other C-family languages, the operators `&&` and `||`, along with the conditional operator `?:` do *not* currently perform "short-circuiting"; +> Like HLSL but unlike most other C-family languages, the `&&` and `||` operators do *not* currently perform "short-circuiting". > they evaluate all of their operands unconditionally. +> However, the `?:` operator do perform short-circuiting if the condition is a scalar. Use of `?:` where the condition is a vector is deprecated in Slang. The vector version of `?:` operator does *not* perform short-circuiting, and the user is advised to call `select` instead. > The default behavior of these operators is likely to change in a future Slang release. Additional expression forms specific to shading languages follow. -- cgit v1.2.3