User Tools

Site Tools


harlowe:it

Differences

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

Link to this comparison view

Next revision
Previous revision
harlowe:it [2017/06/19 02:55]
l created
harlowe:it [2017/10/09 20:39] (current)
Line 1: Line 1:
-====It keyword====+====it keyword====
  
 This keyword is a shorthand for the closest leftmost value in an expression. It lets you write This keyword is a shorthand for the closest leftmost value in an expression. It lets you write
Line 17: Line 17:
 ''​%%(print:​ < 4)%%'',​ an error will result nonetheless. ''​%%(print:​ < 4)%%'',​ an error will result nonetheless.
  
-If the ''​%%it%%''​ keyword equals a [[harlowe:​datamap|datamap]],​ [[harlowe:​string|string]],​ [[harlowe:​Array|Array]], or other "​collection"​ data type, then you can access data values+If the ''​%%it%%''​ keyword equals a [[harlowe:​datamap|datamap]],​ [[harlowe:​string|string]],​ [[harlowe:​Array|array]], or other "​collection"​ data type, then you can access data values
 using the ''​%%its%%''​ variant - ''​%%(print:​ $red is '​egg'​ and its length is 3)%%''​ or ''​%%(set:​$red to its 1st)%%''​. Much like the ''​%%'​s%%''​ using the ''​%%its%%''​ variant - ''​%%(print:​ $red is '​egg'​ and its length is 3)%%''​ or ''​%%(set:​$red to its 1st)%%''​. Much like the ''​%%'​s%%''​
 operator, you can use computed values with ''​%%its%%''​ - ''​%%(if:​ $red's length is 3 and its $position is $value)%%''​ will work as operator, you can use computed values with ''​%%its%%''​ - ''​%%(if:​ $red's length is 3 and its $position is $value)%%''​ will work as
 expected. expected.
harlowe/it.1497855315.txt.gz ยท Last modified: 2017/10/09 20:37 (external edit)