Преглед на файлове

Improve description of `range` function.

Fixes #5763

The description from before did not take negative `s` into account.
HolonProduction преди 3 години
родител
ревизия
b0001380c0
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      tutorials/scripting/gdscript/gdscript_advanced.rst

+ 3 - 3
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:
 Some examples involving C-style for loops: