变量值


【Variable Values】

变量的值可以由任意文本组成,可选择性地用单引号(')或双引号(")括起来。

【Variable values are comprised by any arbitrary text, which can optionally be wrapped inside single (') or double (") quotes.】

带引号的变量可以跨多行,而不带引号的变量则限制为一行。

【Quoted variables can span across multiple lines, while non quoted ones are restricted to a single line.】

注意,当由 Node.js 解析时,所有值都会被解释为文本,这意味着任何值都会在 Node.js 中成为一个 JavaScript 字符串。例如,以下值:0true{ "hello": "world" } 将分别变为字面字符串 '0''true''{ "hello": "world" }',而不是数字 0、布尔值 true 和带有 hello 属性的对象。

【Noting that when parsed by Node.js all values are interpreted as text, meaning that any value will result in a JavaScript string inside Node.js. For example the following values: 0, true and { "hello": "world" } will result in the literal strings '0', 'true' and '{ "hello": "world" }' instead of the number zero, the boolean true and an object with the hello property respectively.】

有效变量示例:

【Examples of valid variables:】

MY_SIMPLE_VAR = a simple single line variable
MY_EQUALS_VAR = "this variable contains an = sign!"
MY_HASH_VAR = 'this variable contains a # symbol!'
MY_MULTILINE_VAR = '
this is a multiline variable containing
two separate lines\nSorry, I meant three lines'