From 0e3960321fce1bc6b61462bdda4cc539b5cf4c5f Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Wed, 19 Jun 2024 22:22:10 +0200 Subject: [PATCH] Doc: little changes --- doc/Expr.adoc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/Expr.adoc b/doc/Expr.adoc index 9ba2fd9..b288ce4 100644 --- a/doc/Expr.adoc +++ b/doc/Expr.adoc @@ -396,12 +396,16 @@ _non-empty-list_ = "**[**" _any-value_ {"**,**" _any-value} "**]**" + .Examples `>>>` [blue]`[1,2,3]` [gray]_// List of integers_ + [green]`[1, 2, 3]` + `>>>` [blue]`["one", "two", "three"]` [gray]_// List of strings_ + [green]`["one", "two", "three"]` + `>>>` [blue]`["one", 2, false, 4.1]` [gray]_// List of mixed-types_ + [green]`["one", 2, false, 4.1]` + `>>>` [blue]`["one"+1, 2.0*(9-2)]` [gray]_// List of expressions_ + [green]`["one1", 14]` + `>>>` [blue]`[ [1,"one"], [2,"two"]]` [gray]_// List of lists_ + [green]`[[1, "one"], [2, "two"]]` @@ -434,18 +438,25 @@ Array's items can be accessed using the index `[]` operator. .Items of list `>>>` [blue]`[1,2,3].1` + [green]`2` + `>>>` [blue]`list=[1,2,3]; list.1` + [green]`2` + `>>>` [blue]`["one","two","three"].1` + [green]`two` + `>>>` [blue]`list=["one","two","three"]; list.(2-1)` + [green]`two` + `>>>` [blue]`list.(-1)` + [green]`three` + `>>>` [blue]`list.(10)` + [red]`Eval Error: [1:9] index 10 out of bounds` + `>>>` [blue]`#list` + [green]`3` + `>>>` [blue]`index=2; ["a", "b", "c", "d"].index` + [green]`c`