Description:
Compute an expression against a record and return the modified record.
Syntax:
r.run(xi,…)
Note:
The function computes the expression x against record r and return the modified record. Usually, it is used to change the field values of r, for example, when x is col1=col2+1, it will change the field value of col1.
Parameter:
r |
A record |
xi |
An expression, which is generally a field name or a legal expression composed of field names, and in which "~" references the current record |
Return value:
The modified record
Example:
|
A |
|
1 |
=[[12,23]].new(~(1):col1,~(2):col2) |
|
2 |
=A1(1).run(col1=col2+1) |
|
3 |
=A1(1).run(col1=col2+1,col2=col1+col2) |
|
Note:
Difference between r.(x) and r.run(x): r.(x) computes the value of expression x and returns it; r.run(x) modifies r through the computation of x, and returns the modified r.
Related function: