当前位置:网站首页>Peoplecode expression - basic expression
Peoplecode expression - basic expression
2022-07-21 23:50:00 【zhiyou-rookie】
PeopleCode expression
This section mainly elaborates from the following parts
- Base expression
- Constant
- Function expression
- System variables
- Metastring
- Defined name references
- Summary of reserved words
Base expression
The expression gives peoplecode Value of data type . A simple peoplecode An expression can consist of a constant , Temporary variable , System variables ,record References to fields , Or function call composition . Simple expressions can be modified by unary operators ( For example, negative sign or logical non ), Or use binary operators to combine into mixed expressions ( For example, plus sign or logical and ).
The string obtained by defining the name reference is in PTtools Defined in the . for example record or page. They can make you refer to definitions rather than text strings , Because it will be difficult to maintain .
Constant
peoplecode Support digital type , String and Boolean constants , It also supports our custom constants . Constants are also supported NULL, It points to an invalid object reference .
notes : We can express the date by converting string and numeric constants , Date time and time . Use Date,Date3,DateTime6,DateTimeValue,DateValue,Time3,TimePart and TimeValue Function to achieve the purpose . We can also use FormatDateTime To format the date value in text format .
Digital constant
The number constant is any number in decimal . for example :
- 7
- 0.888
- -123.0023
String constant
String constants can be defined by either single quotation marks or double quotation marks . If a quotation mark is part of a string , Then we need to use another kind of quotation mark as the definition of string constant ,. As an alternative , We can include this delimiter twice . for example :
"This is a string constant."
'So is this.'
'She said, "This is a string constant."'
"She said, ""This is a string constant."""
Use the following code to include quotation marks in your string as text :
&cDblQuote = '"'; /* singlequote doublequote singlequote */
The following example will produce a double quoted string :
&cDblQuote = """"; /* dquote dquote dquote dquote */
We can also embed double quotation marks in the string twice :
&sImage = Char(10) | '<IMG SRC="%IMAGE(' | &pImageName | ')"';
The string must be one line , If we need to create a multi line string , Then we must use the concatenation character to connect the strings into one line .
&string = "Line 1" | Char(10) | "Line 2" | Char(10);
Boolean value
Boolean constant represents a truth value . It has two values , One is true, One is false.
NULL Constant
NULL A constant represents an object that does not point to a valid value . This means calling a method or trying to get or set a failed value .NULL Constant is its keyword NULL.
User defined constant
We can define constants at the beginning of the program . Then we can use the values associated with these declared constants anywhere . Constants can be defined as numbers , String type , Boolean type value .
User defined constants can only be used in the following ways .
Constant &Start_New_Instance = True;
Constant &Display_Mode = 0;
Constant &AddMode = “A”:
Local Field &Start_Date;
...
边栏推荐
- Store metadata in MySQL and PostgreSQL
- Day02 test case knowledge summary (Part 1)
- Is it feasible to enter software testing at the age of 28?
- About the solution of "indentation error: unindent does not match any outside indentation level"
- Lamp架构——mysq集群及主从复制(2)
- 测试工程师入门知识点整理
- Zhiqiu
- view
- How to do app upgrade test?
- charles常用功能
猜你喜欢
charles常用功能
JMeter之上传文件和下载文件
What to do if the research and development quality is poor
Take you to easily decrypt the white box test and (Demo detailed explanation)
Page redirection
搭建服务器内网yum仓库
Test case management tool recommendation
实现页面与页面之间的信息交换
Lamp Architecture - MySQL router (read / write separator)
LAMP架構——mysql路由器(讀寫分離器)
随机推荐
Motion recovery structure (3D reconstruction task3-1)
JMeter script generation is based on RAP2
How can app testing ensure multi model coverage?
Learning from Chapter 1 to Chapter 5 of electrical EPLAN software
Class inheritance experiment report
Day02 test case knowledge summary (Part 1)
What should I learn about self-study software testing?
postman newman jenkins
JMeter's BeanShell generates random Chinese characters
Realize information exchange between pages
10061 unknown error error is reported when connecting to the previously available MySQL database
页面重定向
JMeter之以页面形式保存测试过程数据
Audio and video learning notes (Thor) - Technical Analysis
Variable usage method of BeanShell of JMeter
Quickly solve the problem that the computer wireless network cannot be connected
LR 负载均衡器管理,分布式负载生成器
AGV debugging notes (I) - model: mir250
request常用方法及应用
Data driven testing of hand-in-hand teaching UI automation