From b0001380c065a24c8133b4cb06dd344be8ed1dca Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Fri, 7 Oct 2022 20:40:25 +0200 Subject: [PATCH] Improve description of `range` function. Fixes #5763 The description from before did not take negative `s` into account. --- tutorials/scripting/gdscript/gdscript_advanced.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/scripting/gdscript/gdscript_advanced.rst b/tutorials/scripting/gdscript/gdscript_advanced.rst index f32dd553f..ffa2f0c3a 100644 --- a/tutorials/scripting/gdscript/gdscript_advanced.rst +++ b/tutorials/scripting/gdscript/gdscript_advanced.rst @@ -364,9 +364,9 @@ The range() function can take 3 arguments: :: - range(n) # Will go from 0 to n-1. - range(b, n) # Will go from b to n-1. - range(b, n, s) # Will go from b to n-1, in steps of s. + range(n) # Will count from 0 to n in steps of 1. The parameter n is exclusive. + range(b, n) # Will count from b to n in steps of 1. The parameters b is inclusive. The parameter n is exclusive. + range(b, n, s) # Will count from b to n, in steps of s. The parameters b is inclusive. The parameter n is exclusive. Some examples involving C-style for loops: