To use, select the number or string literal in the editor, press Ctrl + 1 and select Extract to Constant.
要使用这个重构,请选择编辑器中的数字或字符串文字,然后按下Ctrl +1并选择Extract to Constant。
Listing 2 shows an array constructor with four elements with values given by the NULL constant, a variable, a literal and a scalar sub-query, respectively.
清单2显示具有4个元素的阵列构造函数,其值分别由NULL常数、变量、文字和标量子查询提供。
An integer literal is a sequence of digits representing an integer constant.
整型字面值是一个代表整型常量的数字序列。
An imaginary literal is a decimal representation of the imaginary part of a complex constant.
虚数字面值是复数型常量的虚数部分的十进制表示。
A string literal represents a string constant obtained from concatenating a sequence of characters. There are two forms: raw string literals and interpreted string literals.
字符串字面值表示由字符序列构成的字符串常量。有两种格式:原始字符串字面值和解释字符串字面值。
If you have a value that never changes in your application, you can define a named constant and use it in place of a literal value.
如果有一个值在应用程序中始终不变,则可以定义一个命名常数,并用该常数取代文本值。
If you have a value that never changes in your application, you can define a named constant and use it in place of a literal value.
如果有一个值在应用程序中始终不变,则可以定义一个命名常数,并用该常数取代文本值。
应用推荐