MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.

I'm not curious

Constants in esProc

Published on 15 September 14
In esProc computing, we may frequently use constants or store the data in the cell directly. In this article, letâs learn the usage of constants in the esProc.

1. Directly using constant in the expression
Constants can be directly used in the esProc expression:
Constants in esProc - Image 1
When using the constant in the expression, the integer and float can be used directly, while the string must be quoted with the double quotation mark ââ. For the Boolean constant true and false, they can be used directly in the expression, but there is few cases of using it. .
In particular, the capitalized L can be added to the integer to indicate the long integer. Compared with the integer, the long integer has a wider range of value; The hexadecimal long integer can be represented with a string whose first two characters are 0x:
Constants in esProc - Image 2
Because the value range of normal integers is -231~231-1, that is, -2147483648~2147483647, the result in A2 exceeds the value range of integer. In A1, a long integer is used, and the value range is increased to -263~263-1. By this way, the correct result can be obtained. As can be noticed, in the further computing, if one of the operands involved in the integer computing is the long integer, the result is the long integer.
In the string within the expression, if there are special characters like " and \, an escape character \ is required as indicator before each special character:
Constants in esProc - Image 3
The time and date constants are not allowed in the expression. Instead, only the type conversion functions, such as date(), time(), and datetime(), can be used to convert string or long integer:
Constants in esProc - Image 4
2. Constant cell
When populating the data to the cell directly, if the cell can interpret the character string as a constant, then this cell can be regarded as the constant cell. Its cell value is the constant.
The default text in the constant cell is pink. Based on the data in the cell, the constant will be parsed into various data types. If the cell string in the cell is not understandable, they will be interpreted into string. For example:
Constants in esProc - Image 5
As may be noticed, the double quotation marks are not necessary when defining a string in the constant cell.
Otherwise, in the constant cell, the constant can be represented as percentage, like 5%:
Constants in esProc - Image 6
In the constant cell A1, 5% will be converted to the corresponding float value 0.05. Note: The writing style of 5% cannot be used in the expression. It is only valid in the constant cell.
In particular, the value in the constant cell can also be true, false or null. The constant cell value is the corresponding Boolean value or null value:
Constants in esProc - Image 7
The constant string cell can be used to specify the value in the cell as a string. The cell string in constant string cell is started with the English single quotation mark '. The constant string cell is used to define the string containing special characters or string composed of figures:
Constants in esProc - Image 8
When using the constant string cell, the escape character \ is not necessary if any special character exists in the string:
Constants in esProc - Image 9
In the constant cell, we can also define the sequence constant with the [], and use , to separate the sequence members. For example:
Constants in esProc - Image 10
when defining the sequence constants, the double quotation marks are also unnecessary for indicating the members of string in the sequence.
In the expression, we can use the cell name to make references to the constant cell:
Constants in esProc - Image 11
3. The sequence of constant cells
In esProc, once constants are saved in multiple cells, these cells are often used to form constant sequence for use in the expression. For example:
Constants in esProc - Image 12
In the A2 expression, the [A1:F1] indicates a sequence composed of all cells in the A1~F1 area.
The cells in the sequence can also be used in a range of continuous areas:
Constants in esProc - Image 13
In the A3 expression, [A1:C2] indicates a sequence composed of cell values in this area from A1 to C2, following the order of first-row-then-column to form the sequence.

In esProc, the range of constant cells are often populated to a TSeq:
Constants in esProc - Image 14
In A5, a new TSeq is created. In A6, the record function is used to populate the values of constant cells in the range of A1~E4 area to the TSeq. With such method, the dfx file can be used to store the tabular data.

4. Program parameter
In esProc, some common constants are often set as the program parameter. Firstly, we need to define the program parameters in esProc. When defining the default for the parameters, the similar constant cell will also parse the type automatically:
Constants in esProc - Image 15
When defining the parameters, we can also choose to set the parameter before each running, and modify the parameter value before cellset computing. The parameter can be used in a similar way as using constants:
Constants in esProc - Image 16
Likewise, the sequence can also be used in the program parameter:
Constants in esProc - Image 17
This blog is listed under Development & Implementations Community

Related Posts:
Post a Comment

Please notify me the replies via email.

  • We hope the conversations that take place on will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
You may also be interested in
Awards & Accolades for MyTechLogy
Winner of
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url