Changes

Jump to navigation Jump to search
10 bytes removed ,  12:20, 23 April 2011
no edit summary
|-
| valign='top' | '''Examples'''
|<code>map:contains($week, 2)</code> returns <code>true()</code>.<br/><code>map:contains($week, 9)</code> returns <code>false()</code>.<br/><code>map:contains(map{}, "xyz")</code> returns <code>false()</code>.<br/><code>map:contains(map{ "xyz":=23 }, "xyz")</code> returns <code>true()</code>.<br/>
|}
|-
| valign='top' | '''Examples'''
|<code>map:get($week, 4)</code> returns <code>"Donnerstag"</code>.<br/><code>map:get($week, 9)</code> returns <code>()</code>. <em>(When the key is not present, the function returns an empty sequence.).</em><br/><code>map:get(map:entry(7,())), 7)</code> returns <code>()</code>. <em>(An empty sequence as the result can also signify that the key is present and the associated value is an empty sequence.).</em><br/>
|}
|-
| valign='top' | '''Examples'''
|<code>map:new()</code> creates an empty map.<br/><code>map:new(())</code> creates an empty map.<br/><code>map:new(map:entry(0, "no"), map:entry(1, "yes"))</code> creates a map with the values <code>{ 0:="no", 1:="yes" }</code>.<br/><code>map:new(map:entry(0, "no"), map:entry(1, "yes"))</code> creates a map with the values <code>{ 0:="no", 1:="yes" }</code>.<br/><code>map:new(($week, map{ 7:="Unbekannt" }))</code> creates a map with the values <code>{ 0:="Sonntag", 1:="Montag", 2:="Dienstag", 3:="Mittwoch", 4:="Donnerstag", 5:="Freitag", 6:="Samstag", 7:="Unbekannt" }</code>.<br/><code>map:new(($week, map{ 6:="Sonnabend" }))</code> creates a map with the values <code>{ 0:="Sonntag", 1:="Montag", 2:="Dienstag", 3:="Mittwoch", 4:="Donnerstag", 5:="Freitag", 6:="Sonnabend" }</code>.<br/>
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu