User Tools

Site Tools


en:maplist

Differences

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

Link to this comparison view

Next revision
Previous revision
en:maplist [2020/04/26 22:16]
admin created
en:maplist [2020/04/26 22:32] (current)
admin
Line 1: Line 1:
 ===== Map List - Keys and Values ===== ===== Map List - Keys and Values =====
-A Map List is a connection of string keys and associated values.  You may use Map Lists in many statements that are expecting maps and can be used to create a map without the [[map|map]] statement.+A Map List is a connection of string keys and associated values.  The key and value are separated by **'%%->%%'** and key value pairs are separated by commas **'%%,%%'**.  Remember, maps are automatically sorted by their keys and a Map List will sort automatically at run-time. 
 + 
 +You may use Map Lists in many statements that are expecting maps and can be used to create a map without the [[map|map]] statement.
  
 ==== Example ==== ==== Example ====
 <code> <code>
 +inventory = {"apple"->.27,"bananna"->.18,"orange"->.43, "grapefruit"->1.02}
 +print "fruit","price"
 +foreach f -> p in inventory
 + ? f,p
 +next
 </code> </code>
 +
 +==== History ==== 
 +|2.0.0.0|Added Map Lists|
 +
en/maplist.1587960989.txt.gz · Last modified: 2020/04/26 22:16 by admin