From 55f366293cdef6d931d77513cbbecdb3a465dbec Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Fri, 8 Jun 2018 10:51:11 +0200 Subject: [PATCH] Add syntax example for zf with array assignment --- backend/Builtin/Syntax.icl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/Builtin/Syntax.icl b/backend/Builtin/Syntax.icl index 0b0ef59..74494ae 100644 --- a/backend/Builtin/Syntax.icl +++ b/backend/Builtin/Syntax.icl @@ -510,8 +510,9 @@ bs_update_array = { syntax_title = "array update" , syntax_patterns = ["&", "{*&*[\\e]*=*}"] , syntax_code = - [ "{ a & [i]=x, [j]=y, ... } // Updates a by setting index i to x, j to y, ..." - , "# a & [i]=x, [j]=y, ... // Same as # a = {a & [i]=x, [j]=y, ...}" // See https://clean.cs.ru.nl/Clean_2.3 + [ "{ a & [i]=x, [j]=y, ... } // Updates a by setting index i to x, j to y, ..." + , "# a & [i]=x, [j]=y, ... // Same as # a = {a & [i]=x, [j]=y, ...}" // See https://clean.cs.ru.nl/Clean_2.3 + , "{ a & [i]=i\\i<-[0,2..9] } // Fancy things can be done if you combine this with a {{ZF}}. E.g. give the first 5 even indices the value of their index" ] , syntax_description = "Updates an array by creating a copy and replacing one or more elements." , syntax_doc_locations = [CLR 6 "4.4.1" "_Toc311798032"] -- GitLab