Navigation
Synopsis Select a field from a tuple by its field name.
Syntax Exp . Name
Types
Exp Name Exp . Name
tuple[ T1 L1, T2 L2, ... ] Li Ti
Description Field selection applies to tuples with named elements. Exp should evaluate to a tuple with field Name and returns the value of that field. Name stands for itself and is not evaluated.
Examples
rascal>tuple[int key, str val] T = <1, "abc">;
tuple[int key,str val]: <1,"abc">
rascal>T.val;
str: "abc"
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.