diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-02-15 05:49:13 +0000 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-02-15 07:36:30 +0000 |
| commit | cf5b1b4a68d762e6e33cac8367611ecea15fa942 (patch) | |
| tree | 25de1a4113d26882c0135e38b7ff166efbc39969 /doc/yue-id-id.md | |
| parent | ecd8f3bfd07e91d04e0a2d72f4a50f9cc6c75433 (diff) | |
| download | yuescript-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.md | 58 |
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 | ||
| 2781 | Operator `in` juga dapat digunakan dengan tabel dan mendukung varian `not in` untuk negasi: | ||
| 2782 | |||
| 2783 | ```yuescript | ||
| 2784 | has = "foo" in {"bar", "foo"} | ||
| 2785 | |||
| 2786 | if a in {1, 2, 3} | ||
| 2787 | print "a ada di dalam tabel" | ||
| 2788 | |||
| 2789 | not_exist = item not in list | ||
| 2790 | |||
| 2791 | check = -> value not in table | ||
| 2792 | ``` | ||
| 2793 | |||
| 2794 | <YueDisplay> | ||
| 2795 | |||
| 2796 | ```yue | ||
| 2797 | has = "foo" in {"bar", "foo"} | ||
| 2798 | |||
| 2799 | if a in {1, 2, 3} | ||
| 2800 | print "a ada di dalam tabel" | ||
| 2801 | |||
| 2802 | not_exist = item not in list | ||
| 2803 | |||
| 2804 | check = -> value not in table | ||
| 2805 | ``` | ||
| 2806 | |||
| 2807 | </YueDisplay> | ||
| 2808 | |||
| 2809 | Daftar atau tabel dengan satu elemen memeriksa kesamaan dengan elemen tersebut: | ||
| 2810 | |||
| 2811 | ```yuescript | ||
| 2812 | -- [1,] memeriksa apakah nilai == 1 | ||
| 2813 | c = a in [1,] | ||
| 2814 | |||
| 2815 | -- {1} juga memeriksa apakah nilai == 1 | ||
| 2816 | c = a in {1} | ||
| 2817 | |||
| 2818 | -- Tanpa koma, [1] adalah akses indeks (tb[1]) | ||
| 2819 | with tb | ||
| 2820 | c = a in [1] | ||
| 2821 | ``` | ||
| 2822 | |||
| 2823 | <YueDisplay> | ||
| 2824 | |||
| 2825 | ```yue | ||
| 2826 | -- [1,] memeriksa apakah nilai == 1 | ||
| 2827 | c = a in [1,] | ||
| 2828 | |||
| 2829 | -- {1} juga memeriksa apakah nilai == 1 | ||
| 2830 | c = a in {1} | ||
| 2831 | |||
| 2832 | -- Tanpa koma, [1] adalah akses indeks (tb[1]) | ||
| 2833 | with tb | ||
| 2834 | c = a in [1] | ||
| 2835 | ``` | ||
| 2836 | |||
| 2837 | </YueDisplay> | ||
| 2838 | |||
| 2781 | # Perulangan For | 2839 | # Perulangan For |
| 2782 | 2840 | ||
| 2783 | Ada dua bentuk perulangan for, seperti di Lua. Satu numerik dan satu generik: | 2841 | Ada dua bentuk perulangan for, seperti di Lua. Satu numerik dan satu generik: |
