Description Fields Note Author(s) Examples
A typed pair container similar to C++ std::pair extending the Pair class
T1
(character) string specifying the type of the first element
T2
(character) string specifying the type of the second element
Date of last modification: 09.09.2015
Change history: none
Roman Pahl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | x0 <- TypedPair(T1 = "character", first = "x", T2 = "numeric", second = 0)
Analog: Short (implicit) construction
x0 <- TypedPair("character", "x", "numeric", 0)
x0$first # "x"
x0$second # "0"
## Not run:
x0$setFirst(1) # Throws "bad type - expected character but got numeric"
## End(Not run)
x0$setFirst("z") # ok
x0$first # "z"
y1 <- TypedPair("character", "y", "numeric", 1)
x0$swap(y1)
x0$first # "y"
x0$second # "1"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.