Doc: little changes
This commit is contained in:
parent
61d34fef7d
commit
0e3960321f
@ -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`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user