From 4a84f37b20187f548495579d53b3696e627aeb8f Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 1 Aug 2025 23:34:57 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=20Demo19=20=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/Demo/Demo19/Main.snow | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/playground/Demo/Demo19/Main.snow b/playground/Demo/Demo19/Main.snow index 046d496..5bcef84 100644 --- a/playground/Demo/Demo19/Main.snow +++ b/playground/Demo/Demo19/Main.snow @@ -3,11 +3,23 @@ module: Main function: main return_type: void body: - declare cols: int = 2 - declare matrix: int[] = [1, 2, 3, 4] + declare n: int[][][][] = [ + [ + [ [17, 18], [19, 20] ], + [ [21, 22], [23, 24] ] + ], + [ + [ [25, 26], [27, 28] ], + [ [29, 30], [31, 32] ] + ] + ] - declare x: int = matrix[cols] + declare i: int = 0 + declare j: int = 1 + declare k: int = 0 + declare l: int = 0 + declare x: int = n[i][j][k][l] os.print(x) end body end function