print 运算符print operator

输出单个行,其中包含一个或多个标量表达式。Outputs single-row with one or more scalar expressions.

print x=1, s=strcat("Hello", ", ", "World!")

语法Syntax

print [ ColumnName =] ScalarExpression [',' ...]print [ ColumnName =] ScalarExpression [',' ...]

参数Arguments

  • ColumnName:要分配给输出的单数列的选项名称。ColumnName : An option name to assign to the output's singular column.
  • ScalarExpression:要计算的标量表达式。ScalarExpression : A scalar expression to evaluate.

返回Returns

一个单列单行表,其单个单元格的值为已计算的 ScalarExpression。A single-column, single-row, table whose single cell has the value of the evaluated ScalarExpression .

示例Examples

print 运算符非常有用,可以快速计算一个或多个标量表达式,并用生成的值创建一个单行表。The print operator is useful as a quick way to evaluate one or more scalar expressions and make a single-row table out of the resulting values. 例如:For example:

print 0 + 1 + 2 + 3 + 4 + 5, x = "Wow!"
print banner=strcat("Hello", ", ", "World!")