From e7fb325da1650975f75861a723ea4a2e02fdac43 Mon Sep 17 00:00:00 2001 From: v420v Date: Sun, 27 Oct 2024 22:30:24 +0900 Subject: [PATCH] docs: rename variable name idx to i --- docs/docs.md | 8 ++++---- docs/docs_jp.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs.md b/docs/docs.md index 37f5fac..0f7da59 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -204,11 +204,11 @@ Variable arguments can be accessed using the built-in variables `argv` and `argc func add_nums(...) i32 { let n i32 = 0; - let idx i32 = 0; + let i i32 = 0; - while idx < argc { - n = n + argv[idx]; - idx++; + while i < argc { + n = n + argv[i]; + i++; } return n; diff --git a/docs/docs_jp.md b/docs/docs_jp.md index 1117082..3f16c8f 100644 --- a/docs/docs_jp.md +++ b/docs/docs_jp.md @@ -205,11 +205,11 @@ label: func add_nums(...) i32 { let n i32 = 0; - let idx i32 = 0; + let i i32 = 0; - while idx < argc { - n = n + argv[idx]; - idx++; + while i < argc { + n = n + argv[i]; + i++; } return n;