From 3d2b06b5151c1c0f1110c4e25ec3c04b3ef44f29 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 3 Sep 2022 14:26:54 +0200 Subject: [PATCH] :art: Update --- docs/Overview/declaration.mdr | 2 +- docs/Reference/ControlFlow/ForLoop.mdr | 6 +++--- docs/Reference/ControlFlow/Repeat.mdr | 2 +- docs/Reference/Functions/Lambdas.mdr | 2 +- docs/Reference/Functions/README.mdr | 2 +- docs/Reference/Types/Unions.mdr | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/Overview/declaration.mdr b/docs/Overview/declaration.mdr index 14753e4d..8cbb0525 100644 --- a/docs/Overview/declaration.mdr +++ b/docs/Overview/declaration.mdr @@ -34,6 +34,6 @@ late Object object_ref; ```gwion,editable var int array_ref[]; -new int[2] => array_ref; +new int[2] :=> array_ref; <<< array_ref >>>; ``` diff --git a/docs/Reference/ControlFlow/ForLoop.mdr b/docs/Reference/ControlFlow/ForLoop.mdr index 69a44eaf..96e90972 100644 --- a/docs/Reference/ControlFlow/ForLoop.mdr +++ b/docs/Reference/ControlFlow/ForLoop.mdr @@ -11,8 +11,8 @@ It also works with a block of code. ```gwion,editable for(var int i; i < 3; ++i) { - i/2 => var float f1; - i/2. => var float f2; + i/2 :=> var float f1; + i/2. :=> var float f2; <<< i, " " , f1, " ", f2 >>>; } ``` @@ -48,7 +48,7 @@ var int array[2][3]; var int i; foreach(a: array) { foreach(b: a) - <<< ++i => b >>>; + <<< ++i :=> b >>>; } foreach(a: array) { foreach(b: a) diff --git a/docs/Reference/ControlFlow/Repeat.mdr b/docs/Reference/ControlFlow/Repeat.mdr index 21659623..76f778ad 100644 --- a/docs/Reference/ControlFlow/Repeat.mdr +++ b/docs/Reference/ControlFlow/Repeat.mdr @@ -16,7 +16,7 @@ of course this also works with a block code. ```gwion,editable repeat(3) { - maybe ? "You" : "Me" => var string s; + maybe ? "You" : "Me" :=> var string s; <<< "Hello, ", s, "!" >>>; } ``` diff --git a/docs/Reference/Functions/Lambdas.mdr b/docs/Reference/Functions/Lambdas.mdr index 99142081..af2d32c5 100644 --- a/docs/Reference/Functions/Lambdas.mdr +++ b/docs/Reference/Functions/Lambdas.mdr @@ -26,7 +26,7 @@ Notice there is no semicolon in the lambda body; ### Passing to a function pointer ```gwion,editable funptr void fptr_t(int); -\ i { <<< "passed '", i, "'" >>>; } @=> var fptr_t fptr; +\ i { <<< "passed '", i, "'" >>>; } :=> var fptr_t fptr; fptr(4); ``` diff --git a/docs/Reference/Functions/README.mdr b/docs/Reference/Functions/README.mdr index d03acaa9..0f2b24e2 100644 --- a/docs/Reference/Functions/README.mdr +++ b/docs/Reference/Functions/README.mdr @@ -30,6 +30,6 @@ fun int test(int i, int j) { return i + j; } -test(_, 2) @=> const auto mytest; +test(_, 2) :=> const auto mytest; <<< 40 => mytest >>>; ``` diff --git a/docs/Reference/Types/Unions.mdr b/docs/Reference/Types/Unions.mdr index e5447641..9b9da3dd 100644 --- a/docs/Reference/Types/Unions.mdr +++ b/docs/Reference/Types/Unions.mdr @@ -11,12 +11,12 @@ union U { }; #! create an union with field `i` set to `1` -new U(i, 1) => var U u; +new U(i, 1) :=> var U u; <<< u.i >>>; #! set field f to 2.4 -2.4 => u.f; +2.4 :=> u.f; <<< u.f >>>; #! this will trigger an invalid access error -- 2.43.0