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

esProc’s Multilayer Parameters

Published on 12 September 14
204
0
0
esProc provides a large number of functions, many of which use many parameters. In order to clearly judge positions of these function parameters, and make writing and reading easier, esProc is specially equipped with multilayer separators of function parameters.

1. Separators of function parameters
Colon (:), comma (,) and semicolon (;) are used as separators of function parameters in esProc. Their priority decreases in turn.
The most common method is to use commas to separate parameters, which is in line with function syntax in most programming languages. For example:
esProcâs Multilayer Parameters - Image 1
In this example, parameters of if(), create() and T.insert() function in A3, A4 and A5 are separated from each other by commas.
Some functions have âcoupledâ parameters, which are closely related or work together. In this case, a colon is often used to separate them.
esProcâs Multilayer Parameters - Image 2
For example, for if() function in A3, each condition corresponds to a returned result and colons are used to separate the results. In the in() function used in one condition, 150 and 180 are also separated by a colon and together they form a numerical interval [150,180]. In A5âs T.insert() function, field value and field name also come in pairs with colons in between to separate them.
In some functions, indicative parameters can be added to certain parameters to change the computational method relating to them. In this case, colons are usually used as separators. See below:
esProcâs Multilayer Parameters - Image 3
Both A2 and A3 sort records of cities according to state ID first, then sort by name if cities belong to the same state. Difference is that -1 is appended after NAME in A3âs function, meaning that sorting by name is in a descending order.
Sometimes, parameters in function can be divided into different parts according to their roles. Semicolons are usually used to separate these parts.
esProcâs Multilayer Parameters - Image 4
In A2âs groups() function, the parameter before the semicolon is used for grouping, and those after it are for summarizing computation, whose parameters are separated by a colon to define name of the summarizing field. In A3âs top() function, the parameter after semicolon defines that the top 5 records are fetched.
In some functions, parameters are quite many. Usually these parameters are divided into several groups which are separated by semicolons:
esProcâs Multilayer Parameters - Image 5
T.switch() function in A4 transforms different fields into records of another table sequence, and a semicolon is used here. Besides, comma, colon and semicolon are all used in A4 as separators. This kind of code writing creates clear layers for function parameters.

2. Omission of function parameters
Some esProc parameter functions have default values and, therefore, can be omitted, making functions more concise.
The parameter after a colon is generally used to complement anotherâs computational model. If default mode is used, the parameter can be omitted. For example:
esProcâs Multilayer Parameters - Image 6
In A5, parameters after colon are used to designate field names corresponding to certain values when inserting records. Parameters for designating field names can be omitted in A6 because it uses default field names to set field values one by one.
But colons cannot be omitted when they are used to separate intervals:
esProcâs Multilayer Parameters - Image 7
In A3, in(B1+B2,180:) and in(B1+B2,:120) represent respectively B1+B2>=180 and B1+B2<=120, in which the colons cannot be omitted.
For parameters separated by semicolons, the semicolon can be omitted if there is no parameter after it. For example, if n is not set in A.top() function and only the top one is needed; or when the transformation of a certain field is not needed in T.switch() function.
When commas are used as separators, they should generally be retained even if parameters are set by default. For example:
esProcâs Multilayer Parameters - Image 8
Expression in A2 equals to =A1.to(4,A1.len()), expression in A3 equals to =A1.to(1,4).



esProc provides a large number of functions, many of which use many parameters. In order to clearly judge positions of these function parameters, and make writing and reading easier, esProc is specially equipped with multilayer separators of function parameters.

1. Separators of function parameters

Colon (:), comma (,) and semicolon (;) are used as separators of function parameters in esProc. Their priority decreases in turn.

The most common method is to use commas to separate parameters, which is in line with function syntax in most programming languages. For example:

esProcâ

In this example, parameters of if(), create() and T.insert() function in A3, A4 and A5 are separated from each other by commas.

Some functions have âcoupledâ parameters, which are closely related or work together. In this case, a colon is often used to separate them.

esProcâ

For example, for if() function in A3, each condition corresponds to a returned result and colons are used to separate the results. In the in() function used in one condition, 150 and 180 are also separated by a colon and together they form a numerical interval [150,180]. In A5âs T.insert() function, field value and field name also come in pairs with colons in between to separate them.

In some functions, indicative parameters can be added to certain parameters to change the computational method relating to them. In this case, colons are usually used as separators. See below:

esProcâ

Both A2 and A3 sort records of cities according to state ID first, then sort by name if cities belong to the same state. Difference is that -1 is appended after NAME in A3âs function, meaning that sorting by name is in a descending order.

Sometimes, parameters in function can be divided into different parts according to their roles. Semicolons are usually used to separate these parts.

esProcâ

In A2âs groups() function, the parameter before the semicolon is used for grouping, and those after it are for summarizing computation, whose parameters are separated by a colon to define name of the summarizing field. In A3âs top() function, the parameter after semicolon defines that the top 5 records are fetched.

In some functions, parameters are quite many. Usually these parameters are divided into several groups which are separated by semicolons:

esProcâ

T.switch() function in A4 transforms different fields into records of another table sequence, and a semicolon is used here. Besides, comma, colon and semicolon are all used in A4 as separators. This kind of code writing creates clear layers for function parameters.

2. Omission of function parameters

Some esProc parameter functions have default values and, therefore, can be omitted, making functions more concise.

The parameter after a colon is generally used to complement anotherâs computational model. If default mode is used, the parameter can be omitted. For example:

esProcâ

In A5, parameters after colon are used to designate field names corresponding to certain values when inserting records. Parameters for designating field names can be omitted in A6 because it uses default field names to set field values one by one.

But colons cannot be omitted when they are used to separate intervals:

esProcâ

In A3, in(B1+B2,180:) and in(B1+B2,:120) represent respectively B1+B2>=180 and B1+B2

For parameters separated by semicolons, the semicolon can be omitted if there is no parameter after it. For example, if n is not set in A.top() function and only the top one is needed; or when the transformation of a certain field is not needed in T.switch() function.

When commas are used as separators, they should generally be retained even if parameters are set by default. For example:

esProcâ

Expression in A2 equals to =A1.to(4,A1.len()), expression in A3 equals to =A1.to(1,4).

This blog is listed under Development & Implementations Community

Related Posts:
Post a Comment

Please notify me the replies via email.

Important:
  • We hope the conversations that take place on MyTechLogy.com 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
REDHERRING
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

Back to Top