This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
expression [2014/09/28 14:49] ateyourlembas |
expression [2017/10/09 20:39] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | <- [[display|Displaying A Passage Within Another]] --------- [[functions|About Functions]]-> | + | <- [[display|Displaying A Passage Within Another]] --------- [[function|About Functions]]-> |
===== About Expressions ===== | ===== About Expressions ===== | ||
Line 61: | Line 61: | ||
Usually, though, there isn't much call for this - numbers are generally as useful as strings.) | Usually, though, there isn't much call for this - numbers are generally as useful as strings.) | ||
+ | |||
+ | ==== Printing Lists ==== | ||
+ | |||
+ | If you have a list, you can print the contents separated by a comma like so: | ||
+ | |||
+ | <<set $myarray = ["this", "that"]>> | ||
+ | <<print $myarray.join(", ")>> | ||
+ | |||
+ | This will print the following: | ||
+ | |||
+ | this,that | ||
+ | |||
+ | |||
+ | If you have specific questions about using lists in Twine, the [[frequently_asked_questions#how_do_i_get_things_in_and_out_of_a_list_variable|FAQ]] may help. | ||
+ | |||
==== Functions ==== | ==== Functions ==== | ||
Line 134: | Line 149: | ||
| true, false | **Logical values**, created using the logical operators, and commonly used with to the [[<<if>>]] macro. True and false are the only values of this type. | | true, false | **Logical values**, created using the logical operators, and commonly used with to the [[<<if>>]] macro. True and false are the only values of this type. | ||
- | <- [[display|Displaying A Passage Within Another]] --------- [[functions|About Functions]]-> | + | <- [[display|Displaying A Passage Within Another]] --------- [[function|About Functions]]-> |