From: Jérémie Astor Date: Mon, 21 Sep 2020 22:44:31 +0000 (+0200) Subject: Finish updating syntax X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ca747355c95e9fd44c22174274079c3148ae9310;p=gwion.git Finish updating syntax --- 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); }