String

Read(2183) Label: string, constant,

Description:

Define a string constant.

Syntax:

"string"

$[string]

Note:

An expression must be double quoted in use. But the quotation marks are not required if the string constants are defined directly.

 

The macro in "string" will not be replaced. When copying/pasting/inserting/deleting the row, the cell referenced by "string" will not change automatically.

 

The macro in $[string] will be replaced. When copying/pasting/inserting/deleting the row, the cell referenced by $[string] will change automatically.

 

The double quotation marks in $[string] do not need an escape character; while the double quotation marks in "string" needs one.

Parameter:

string

Contents of the string, which can be any character

Return value:

String constant

Example:

"asd"

$[asd]

The the cell referenced by the string enclosed in $[] will change automatically when copying/pasting/inserting/deleting a row,but the one referenced by the string enclosed in "" will not change automatically in the same situation, as shown below.

 

 
The macro in $[] will be replaced automatically, while macro in "" will not.

"${arg1}abc"

"${arg1}abc "

$[${arg1}abc]

"Tomabc", (Suppose the value of arg1 is "Tom").

The double quotation marks in $[] do not need to be escaped; while the escaping of double quotation marks in "" is needed.

$[a"s] 

"a\"s" 

Related function:

Escape character

String concatenation