--- /dev/null
+# For Loops
+**For** loops in Gwion is pretty similar to classic **C** syntax
+
+## basic loops
+@``` forloop0.gw
+for(int i; i < 3; ++i)
+ <<< i >>>;
+@```
+@hide make -s forloop0.test
+
+It also works with a block of code.
+
+@``` forloop2.gw
+for(int i; i < 3; ++i) {
+ i/2 => float f1;
+ i/2. => float f2;
+ <<< i, " " , f1, " ", f2 >>>;
+}
+@```
+@hide make -s forloop2.test
+
+## Nested Loops
+@``` forloop3.gw
+int array[3][4];
+
+for(int i; i < 3; ++i) {
+ for(int j; j < 4; ++j) {
+ <<< array[i][j] >>>;
+ }
+}
+@```
+@hide make -s forloop3.test
+
+### Auto Loops
+
+#### Simple auto loop
+@``` forloop4.gw
+int array[2][3];
+for(auto a: array) {
+ <<< a >>>;
+ for(auto b: a)
+ <<< b >>>;
+}
+@```
+@hide make -s forloop4.test
+
+### Auto Pointer loop
+If you want to change it the value in the array, you need a pointer
+
+@``` forloop5.gw
+int array[2][3];
+int i;
+for(auto a: array) {
+ for(auto ref b: a)
+ <<< ++i => *b >>>;
+}
+for(auto a: array) {
+ for(auto ref b: a)
+ <<< *b >>>;
+}
+@```
+@hide make -s forloop5.test