aboutsummaryrefslogtreecommitdiff
path: root/doc/yue-id-id.md
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-02-15 05:49:13 +0000
committerLi Jin <dragon-fly@qq.com>2026-02-15 07:36:30 +0000
commitcf5b1b4a68d762e6e33cac8367611ecea15fa942 (patch)
tree25de1a4113d26882c0135e38b7ff166efbc39969 /doc/yue-id-id.md
parentecd8f3bfd07e91d04e0a2d72f4a50f9cc6c75433 (diff)
downloadyuescript-cf5b1b4a68d762e6e33cac8367611ecea15fa942.tar.gz
yuescript-cf5b1b4a68d762e6e33cac8367611ecea15fa942.tar.bz2
yuescript-cf5b1b4a68d762e6e33cac8367611ecea15fa942.zip
Add goto statement documentation and tests
- Added goto.md documentation files in all languages (en, de, zh, pt-br, id-id) - Updated conditionals.md to include goto statement references - Updated VitePress config to include new goto documentation pages - Updated makefile for goto documentation compilation - Added test outputs for goto examples in all languages - Updated yue.cpp core implementation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'doc/yue-id-id.md')
-rw-r--r--doc/yue-id-id.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/doc/yue-id-id.md b/doc/yue-id-id.md
index 365ee32..ca90d85 100644
--- a/doc/yue-id-id.md
+++ b/doc/yue-id-id.md
@@ -2778,6 +2778,64 @@ if a in list
2778 2778
2779</YueDisplay> 2779</YueDisplay>
2780 2780
2781Operator `in` juga dapat digunakan dengan tabel dan mendukung varian `not in` untuk negasi:
2782
2783```yuescript
2784has = "foo" in {"bar", "foo"}
2785
2786if a in {1, 2, 3}
2787 print "a ada di dalam tabel"
2788
2789not_exist = item not in list
2790
2791check = -> value not in table
2792```
2793
2794<YueDisplay>
2795
2796```yue
2797has = "foo" in {"bar", "foo"}
2798
2799if a in {1, 2, 3}
2800 print "a ada di dalam tabel"
2801
2802not_exist = item not in list
2803
2804check = -> value not in table
2805```
2806
2807</YueDisplay>
2808
2809Daftar atau tabel dengan satu elemen memeriksa kesamaan dengan elemen tersebut:
2810
2811```yuescript
2812-- [1,] memeriksa apakah nilai == 1
2813c = a in [1,]
2814
2815-- {1} juga memeriksa apakah nilai == 1
2816c = a in {1}
2817
2818-- Tanpa koma, [1] adalah akses indeks (tb[1])
2819with tb
2820 c = a in [1]
2821```
2822
2823<YueDisplay>
2824
2825```yue
2826-- [1,] memeriksa apakah nilai == 1
2827c = a in [1,]
2828
2829-- {1} juga memeriksa apakah nilai == 1
2830c = a in {1}
2831
2832-- Tanpa koma, [1] adalah akses indeks (tb[1])
2833with tb
2834 c = a in [1]
2835```
2836
2837</YueDisplay>
2838
2781# Perulangan For 2839# Perulangan For
2782 2840
2783Ada dua bentuk perulangan for, seperti di Lua. Satu numerik dan satu generik: 2841Ada dua bentuk perulangan for, seperti di Lua. Satu numerik dan satu generik: