This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 4rpl:commands:specialsyntax [2022/04/27 21:44] – [Vectors] color discussion Karsten75 | 4rpl:commands:specialsyntax [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 85: | Line 85: | ||
| ---- | ---- | ||
| ===== Lists ===== | ===== Lists ===== | ||
| + | |||
| + | < | ||
| Lists are collections of data. They are similar to arrays but they do not have a fixed length. | Lists are collections of data. They are similar to arrays but they do not have a fixed length. | ||
| Line 100: | Line 102: | ||
| effectively setting element number " | effectively setting element number " | ||
| If **variable** is not a list, a warning will be printed to the console. | If **variable** is not a list, a warning will be printed to the console. | ||
| + | |||
| + | See also: [[4rpl: | ||
| === Example === | === Example === | ||
| Line 115: | Line 119: | ||
| ---- | ---- | ||
| ===== Tables ===== | ===== Tables ===== | ||
| + | |||
| + | < | ||
| Tables are collection of named data. They are sometimes called dictionaries in other languages. | Tables are collection of named data. They are sometimes called dictionaries in other languages. | ||
| Line 141: | Line 147: | ||
| </ | </ | ||
| - | It is possible to iterate over the elements in a table by coercing the table into a list. The following shows two equivalent methods to extract data from a table. | + | ==== Coerce table to list ==== |
| + | It is possible to iterate over the elements in a table by coercing the table into a list. The following shows two equivalent methods to extract data from a table. | ||
| === Example === | === Example === | ||
| Line 152: | Line 159: | ||
| Table -> | Table -> | ||
| - | # method | + | # method |
| Do (GetTablecount(< | Do (GetTablecount(< | ||
| Line 160: | Line 167: | ||
| Loop | Loop | ||
| - | # method | + | # method |
| GetTableKeys(< | GetTableKeys(< | ||