In esProc, cells are automatically classified into different types
according to their values or the expressions they contain. In a cellset, each
type of cell has its own appearance, which highlights the code in the cells.
1.Types of cells
1.1 Constant cell
A cell in which the cell string can be interpreted as the constant
is called a Constant Cell. Its cell value is the
constant.
The constant cell has the following types of values:
The text of a constant cell is in pink by default. Depending on the
data in the cell, its value will be interpreted as various data types. For the
unrecognized data, the value will be taken as the string.
Note:The representation style of 3% is unacceptable
in any expression, but it is acceptable in the constant cell.
Please note the common reserved words below and keep in mind that
they are case-sensitive!
Null value; the cell value of any empty cell is always the null
True
False
- null
Null value; the cell value of any empty cell is always the null
- true
True
- false
False
1.2 String constant cell
A string constant cell is the cell whose cell string starts with
single quote ', indicating it is a constant cell with a string value. The cell
value is a string composed of those characters after the single quote. In this
case, all characters following the single quote will be parsed as string, not
requiring any additional quotes, escape characters, etc.
'abc\d String abc\d
1.3 Computational cell
A computational cell is the cell whose cell string starts with =, and that is used for computing an expression. Its cell value is the computed result of the
expression, which can reference cell values of other cells.
=5*(3+2)
=A1*3
=A1/B2+B1
The text of the computational cell is in black by default.
Click the "Play" button
In the expression,you can use various basic operators to compute cell value:
- a+ba-ba*ba/b
Add, subtract, multiply, and division operations.
=3*4 12
=1+2*3 7
- a%b
Seek the remainder of a divided by b.
=121%11 0, which indicates 121 is a multiple of 11, and is divisible by 11
- a\b
Integer division, in which the integer parts of both a and bare kept. The integer part of the
result will be returned after division.
=11\4 2, cut off the decimal part of the result
=6.1\2.9 3, which is equal to 6\2, the result is 3
Concatenate string s1 and s2. Note that the string will be ignored if added to a real number.
="Stephen"+" "+"Rolfe" String Stephen Rolfe
="A"+3 Integer 3, string "A" is ignored
="A"+string(3) String A3. If you do need to concatenate the string and the real number, please convert the real number to string first.
=11\4 2, cut off the decimal part of the result
=6.1\2.9 3, which is equal to 6\2, the result is 3
- s1+s2
Concatenate string s1 and s2. Note that the string will be ignored if added to a real number.
="Stephen"+" "+"Rolfe" String Stephen Rolfe
="A"+3 Integer 3, string "A" is ignored
="A"+string(3) String A3. If you do need to concatenate the string and the real number, please convert the real number to string first.
1.4 Executable cells
An Executable cell is the cell whose cell string starts with >, in which
certain actions will be executed. The executable cell has no cell value. If an
executable cell starts with one of the reserved words, like if, for, etc. then >can be omitted.
The code in an executable cell can be used to modify the value of another
cell.
>A1=5
>B1=A1+3
>A1=5
>B1=A1+3
1.5 Comment cells
A comment cell is the cell whose cell string starts with /.Its cell value is null.
Comment cells will be ignored during execution.
The text of comment cells is in green by default.
No comments:
Post a Comment