Skip to main content

Field

rascal-0.34.0

Synopsis

Assign to a field of a tuple, relation or datatype.

Description

The value V of Assignable is determined and should be of a type that has a field Name. The value of that field is replaced in V by the value of Exp resulting in a new value V' that is assigned to Assignable.

Examples

rascal>data FREQ = wf(str word, int freq);
ok
rascal>W = wf("rascal", 1000);
FREQ: wf("rascal",1000)
rascal>W.freq = 100000;
FREQ: wf("rascal",100000)