From 1b12c4399f718b00d1beb83c68a242a6b16040bd Mon Sep 17 00:00:00 2001 From: Logan Wang <919603023@qq.com> Date: Wed, 14 May 2025 11:40:30 +0800 Subject: [PATCH 1/2] Update variables.mdx --- apps/nextra/pages/en/build/smart-contracts/book/variables.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx b/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx index 721cd7e98..19dabebc2 100644 --- a/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx @@ -763,11 +763,12 @@ script { fun example() { { let x = 0; - x + 1; // value is discarded + x + 1; // x + 2; // value is discarded b"hello"; // value is discarded } } +} ``` But! If the expression contains a resource (a value without the `drop` [ability](abilities.mdx)), From b3ff9c3ac5ebd8f5de0f8de5a4665684e8c22c4e Mon Sep 17 00:00:00 2001 From: Logan Wang <919603023@qq.com> Date: Wed, 14 May 2025 12:40:34 +0800 Subject: [PATCH 2/2] Update variables.mdx --- apps/nextra/pages/en/build/smart-contracts/book/variables.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx b/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx index 19dabebc2..22f9d5bbd 100644 --- a/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx +++ b/apps/nextra/pages/en/build/smart-contracts/book/variables.mdx @@ -763,7 +763,7 @@ script { fun example() { { let x = 0; - x + 1; // + x + 1; // value is discarded x + 2; // value is discarded b"hello"; // value is discarded }