ERights Home elang 
Back to: Scalar Data Types 1st child: String Type On to: IO


Tables: lists and maps

  EList EMap


flexible FlexList FlexMap

E's variations on the traditional array and hashtable.

Coordinate Spaces: positions, regions, twisters

Abstract geometry for symbolic spaces with locality.

Collections Other Than Tables and Spaces

Tables and Spaces exist solely order to be collections. There are other objects that exist for other purposes, but that also act in some ways like collections. For example, File-objects that represent directories map from local file names to the files or directories found by those names in that directory.

? pragma.syntax("0.8")

? def ehomeDir := <file>[interp.getProps()["e.home"]]
# value: <file:c:/Program Files/>

? ehomeDir["eprops-template.txt"].length()
# value: 13845

The one operation E collections generally have in common is the for loop, in both the iterate-over-values form and the iterate-over-key-value-pairs form.

? for name => file in ehomeDir {
>     println(`$name is ${file.length()} bytes`)
> }
# example stdout: bin is 0 bytes
#                 caplets is 0 bytes
#                 e is 5345 bytes
#                 e-template.txt is 5312 bytes
#                 e.jar is 2246185 bytes
#                 eprops-template.txt is 17295 bytes
#                 eprops.txt is 17025 bytes
#                 eprops.txt~ is 17026 bytes
#                 eVersion.txt is 9 bytes
#                 README.txt is 8106 bytes
#                 scripts is 0 bytes
#                 updoc-hash-cache.txt is 0 bytes
#                 winfo.txt is 2164 bytes

Further documentation on collections other than Tables and Spaces -- like directories -- are found in their respective sections.

Unless stated otherwise, all text on this page which is either unattributed or by Mark S. Miller is hereby placed in the public domain.
ERights Home elang 
Back to: Scalar Data Types 1st child: String Type On to: IO
Download    FAQ    API    Mail Archive    Donate

report bug (including invalid html)

Golden Key Campaign Blue Ribbon Campaign