Previous: , Up: Mapping   [Contents][Index]


20.15.9 Unmapping

The unary unmap operator has the form:

unmap value

It gets any value and produces the same value, making it not mapped in case it is a mapped value.

This is useful when we want to read a data structure from the IO space (say, an array of integers) and then use it for storage without changing the underlying IO space. We would do something like:

(poke) var a = unmap (int[3] @ 10#B)
(poke) a[2] = 100