From ca747355c95e9fd44c22174274079c3148ae9310 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 22 Sep 2020 00:44:31 +0200 Subject: [PATCH] Finish updating syntax --- docs/Reference/ControlFlow/ForLoop.mdr | 6 +++--- docs/Reference/Functions/Lambdas.mdr | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Reference/ControlFlow/ForLoop.mdr b/docs/Reference/ControlFlow/ForLoop.mdr index 098fc3c4..ffc385d1 100644 --- a/docs/Reference/ControlFlow/ForLoop.mdr +++ b/docs/Reference/ControlFlow/ForLoop.mdr @@ -12,8 +12,8 @@ It also works with a block of code. @``` forloop2.gw for(var int i; i < 3; ++i) { - i/2 => float f1; - i/2. => float f2; + i/2 => var float f1; + i/2. => var float f2; <<< i, " " , f1, " ", f2 >>>; } @``` @@ -21,7 +21,7 @@ for(var int i; i < 3; ++i) { ## Nested Loops @``` forloop3.gw -int array[3][4]; +var int array[3][4]; for(var int i; i < 3; ++i) { for(var int j; j < 4; ++j) { diff --git a/docs/Reference/Functions/Lambdas.mdr b/docs/Reference/Functions/Lambdas.mdr index 59b00e32..91e686c6 100644 --- a/docs/Reference/Functions/Lambdas.mdr +++ b/docs/Reference/Functions/Lambdas.mdr @@ -20,7 +20,7 @@ You can even use it to ### Passing to a function pointer @``` lambda_fptr0.gw -typedef void fptr_t(int); +funcdef void fptr_t(int); \ i { <<< "passed '", i, "'" >>>; } @=> var fptr_t fptr; fptr(4); @``` @@ -28,7 +28,7 @@ fptr(4); ### As Argument to Functions @``` lambda_args0.gw -typedef void fptr_t(int); +funcdef void fptr_t(int); fun void test(fptr_t fptr) { fptr(5); } -- 2.43.0