07.05.2014 Views

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2 Token Classes<br />

• Current position is a function parameter expecting a value class token (for example the parameter of the ABS<br />

function), or it is the root level of a cell type formula or an array type formula (for example the return value of the<br />

outer function in a cell formula, a shared formula, or an array formula):<br />

▪ If the forced array class state is set, all tokens will be changed to array class, otherwise to value class.<br />

Examples for token transformation, when value class is expected without forced array class state:<br />

• In the cell formula =ABS(A1), the tRefR token is changed to value class (tRefV), and the tFuncV(ABS)<br />

token keeps its value class (root level of a cell function).<br />

• In the cell formula =ABS(PI()), the tFuncV(PI) token keeps unchanged.<br />

• In the cell formula =ABS({1}), the tArrayA token is changed to value class (tArrayV).<br />

Examples for token transformation, when value class is expected with forced array class state:<br />

• In the name formula =ABS(A1), the tRefR token is changed to array class (tRefA, a name type formula sets<br />

the forced array class state for all parameters of functions returning a value).<br />

• In the cell formula =MDETERM(ABS(A1)), the tRefR token is set to array class (tRefA, forced array class<br />

in MDETERM function parameter).<br />

• Current position is a function parameter expecting an array class token (for example the parameter of the MDETERM<br />

function):<br />

▪ All tokens are changed to array class.<br />

Examples for token transformation, when array class is expected:<br />

• In the formula =MDETERM(A1), the tRefR token is changed to array class (tRefA).<br />

• In the formula =MDETERM(PI()), the tFuncV(PI) token is changed to array class (tFuncA).<br />

• In the formula =MDETERM({1}), the tArrayA token keeps unchanged.<br />

3.2.5 Binary Reference Operators<br />

<strong>The</strong> binary reference operators tIsect (➜3.6.13), tList (➜3.6.14), and tRange (➜3.6.15) are always encapsulated into<br />

reference subexpression tokens (for instance tMemArea, ➜3.9.4, or tMemFunc, ➜3.9.7). <strong>The</strong>se tokens will change their<br />

token class, but the operands of the reference operators will not be changed. Because these operators require reference<br />

operands (constant references or functions returning a reference), the actual operands of these operators always have<br />

reference class.<br />

Example: <strong>The</strong> ABS function in the cell formula =ABS(A1 A1) expects value class for its parameter. <strong>The</strong> intersection<br />

operator tIsect and its operands are encapsulated into a tMemAreaR token, which is changed to value<br />

class in cell formulas. <strong>The</strong> tRefR tokens of the intersection operator are not changed.<br />

<strong>The</strong> resulting token array of this formula is:<br />

tMemAreaV, tRefR(A1), tRefR(A1), tIsect, tFuncV(ABS).<br />

35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!