get()

Read(128) Label: level,

Description:

Get information about base members at a superior level in a multilayer loop function.

Syntax:

get(level,F;a:b)

Note:

The function, only valid with a loop function, gets information about base members at a superior level in a multilayer loop function. Parameter a:b can be treated as […].

Parameters:

level

The number of levels between the current level, which is recorded as 0, and the desired superior level

F

Field name, which is sometimes represented by #, denoting the ordial number of a field; get members directly when it is absent

a

Expression of the ordinal number of a member; can be omitted

b

Expression of the ordinal number of a member; can be omitted

Return value:

A member value in a sequence or a sequence of values

Example:

 

A

 

1

[1,2,3]

 

Calculate the maximum distance from each value to the others

2

=A1.(A1.max(abs(~-get(1))))

3

=A1.(A1.([~,get(1;0:2)]))

Get members at the second loop level, and members at the parent level corresponding to index items from the current one to the one two items after it

4

=demo.query("select * from employee")

Query the employee table where the highest salary is 13000 and the lowest is 3000

5

=A4.derive(A4.max(abs(SALARY-get(1,SALARY;1:5))):MaxDiffSALARY)

Calculate the maximum salary difference for each employee compared with every other employee