|
![]() |
||||||||||||||
Record TutorialRecord Update SelectorsRecord update selector is an operator that evaluates the updated record. Because WAFL core is pure functional, the record that is first operand of update selector is not changed or updated. The basic form of record update selector is: <record>^<element-name>(<value>); A basic update selector ^name(...) is applicable to any record having an element with a specified name. Its type is (Record[name:'1]['2] * '1 -> Record[name:'1]['2]). In an advanced form, a sequence of update selectors can be used. In that case, the syntax: R^a^b^c(x) is semantically equivalent to: R^a( R.a^b( R.a.b^c(x) ) ). Please note that expressions R^a^b(x) and R.a^b(x) are not semantically equivalent. The first evaluates the record R where value of R.a.b is replaced with x. The second evaluates R.a where value of attribute b is replaced with x.
|
|
||||||||||||||
© 2006 Saša Malkov | |||||||||||||||