Browse Source

Merge pull request #339 from pkowal1982/for_string

for statement iterating through String characters
Rémi Verschelde 8 years ago
parent
commit
5bed63e240
1 changed files with 2 additions and 0 deletions
  1. 2 0
      reference/gdscript.rst

+ 2 - 0
reference/gdscript.rst

@@ -696,6 +696,8 @@ in the loop variable.
     for i in range(2,8,2):
         statement  # similar to [2, 4, 6] but does not allocate an array
 
+    for c in "Hello":
+        print(c)   # iterate through all characters in a String, print every letter on new line
 match
 ^^^^^