User Tools

Site Tools


en:maplist

This is an old revision of the document!


Map List - Keys and Values

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 statement.

Example

inventory = {"apple"->.27,"bananna"->.18,"orange"->.43, "grapefruit"->1.02}
print "fruit","price"
foreach f -> p in inventory
	? f,p
next

History

2.0.0.0Added Map Lists
en/maplist.1587961413.txt.gz · Last modified: 2020/04/26 22:23 by admin