User Tools

Site Tools


harlowe:datamap

Differences

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

Link to this comparison view

Next revision
Previous revision
harlowe:datamap [2017/06/19 02:31]
l created
harlowe:datamap [2019/04/16 04:13] (current)
l
Line 31: Line 31:
 ^Operator ^ Meaning ^ Example ^ ^Operator ^ Meaning ^ Example ^
 | ''​is''​ | Evaluates to boolean ''​true''​ if both sides contain equal names and values, otherwise ''​false''​. | ''​(dm:"​HP",​5) is (dm:"​HP",​5)''​ (is true)| | ''​is''​ | Evaluates to boolean ''​true''​ if both sides contain equal names and values, otherwise ''​false''​. | ''​(dm:"​HP",​5) is (dm:"​HP",​5)''​ (is true)|
-| ''​is not''​ | Evaluates to ''​true''​ if both sides differ in items or ordering. | ''​(dm:"​HP",​5) is not (dm:"​HP",​4)''​ (is true)<br>''​(dm:"​HP",​5) is not (dm:"​MP",​5)''​ (is true)| +| ''​is not''​ | Evaluates to ''​true''​ if both sides differ in items or ordering. | ''​(dm:"​HP",​5) is not (dm:"​HP",​4)''​ (is true)''​(dm:"​HP",​5) is not (dm:"​MP",​5)''​ (is true)| 
-| ''​contains''​ | Evaluates to ''​true''​ if the left side contains the name on the right.<br>(To check that a datamap contains a value, try using ''​contains''​ with [(datavalues:​)](#​macro_datavalues)) ​| ''​(dm:"​HP",​5) contains "​HP"''​ (is true)<br>''​(dm:"​HP",​5) contains 5''​ (is false)|+| ''​contains''​ | Evaluates to ''​true''​ if the left side contains the name on the right. (To check that a datamap contains a value, try using ''​contains''​ with [[harlowe:​datavalues|(datavalues:​)]| ''​(dm:"​HP",​5) contains "​HP"''​ (is true)''​(dm:"​HP",​5) contains 5''​ (is false)|
 | ''​is in''​ | Evaluates to ''​true''​ if the right side contains the name on the left. | ''"​HP"​ is in (dm:"​HP",​5)''​ (is true)| | ''​is in''​ | Evaluates to ''​true''​ if the right side contains the name on the left. | ''"​HP"​ is in (dm:"​HP",​5)''​ (is true)|
 | ''​+''​ | Joins datamaps, using the right side's value whenever both sides contain the same name. | ''​(dm:"​HP",​5) + (dm:"​MP",​5)''​| | ''​+''​ | Joins datamaps, using the right side's value whenever both sides contain the same name. | ''​(dm:"​HP",​5) + (dm:"​MP",​5)''​|
 | '''​s''​ | Obtaining the value using the name on the right. | ''​(dm:"​love",​155)'​s love''​ (is 155).| | '''​s''​ | Obtaining the value using the name on the right. | ''​(dm:"​love",​155)'​s love''​ (is 155).|
 | ''​of''​ | Obtaining the value using the name on the left. | ''​love of (dm:"​love",​155)''​ (is 155).| | ''​of''​ | Obtaining the value using the name on the left. | ''​love of (dm:"​love",​155)''​ (is 155).|
 +| ''​matches''​ | Evaluates to boolean ''​true''​ if the datamap on one side matches the pattern on the other. | ''​(dm:"​Love",​2,"​Fear",​4) matches (dm: "​Love",​ num, "​Fear",​ num)''​|
 +| ''​is a'',​ ''​is an''​ | Evaluates to boolean ''​true''​ if the right side is ''​dm''​ or ''​datamap'',​ and the left side is a datamap. | ''​(dm:​) is a datamap''​|
 +
harlowe/datamap.1497853882.txt.gz · Last modified: 2017/10/09 20:37 (external edit)