User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

harlowe:ds [2017/10/09 20:39] (current)
Line 1: Line 1:
 +**(ds: // <span class=parameter_optional>​[</​span>​...Any<​span class=parameter_optional>​]</​span>//​) -> //​[[harlowe:​Dataset|dataset]]//​**
 +Also known as: [[harlowe:​dataset|(dataset:​)]]
 +Creates a [[harlowe:​dataset|dataset]],​ which is an unordered collection of unique values.
 +=== Example usage: ===
 +''​%%(ds:​)%%''​ creates an empty dataset, which could be filled with other values later.
 +''​%%(ds:​ "​gold",​ "​frankincense",​ "​myrrh"​)%%''​ creates a dataset with three [[harlowe:​string|string]].
 +=== Rationale: ===
 +For an explanation of what datasets are, see the Dataset article. This macro is the primary
 +means of creating datasets - simply supply the values to it, in any order you like.
 +=== Details: ===
 +You can also use this macro to remove duplicate values from an [[harlowe:​array|array]] (though also eliminating the array'​s
 +order) by using the spread ''​%%...%%''​ operator like so: ''​%%(a:​ ...(ds: ...$array))%%''​.
 +=== See also: ===
 +[[harlowe:​dm|(dm:​)]],​ [[harlowe:​a|(a:​)]]
harlowe/ds.txt ยท Last modified: 2017/10/09 20:39 (external edit)