output()

Read(3005) Label: console, output, printout data,

Description:

Output data to console.

Syntax:

output(x,...)

Note:

The function exports one or more variables separated with the comma; the data printed out from console is separated with the tab. If parameter x is a table sequence, the function can only export 10 rows at most; to export all rows, use A.export() function first to convert the table sequence into strings and then output the data with this function.

Parameter:

x,…

Export parameters separated with the comma

Option:

@t

Output data as well as the current time which will be placed before the printout data

@s

Won’t create a new line using carriage return after the current info is output, which means info of the next cell will be printed on same line of that of the current one

@g

Also record data in the log file; default log level is info

@g1

Also record data in the log file; default log level is debug

@g2

Also record data in the log file; default log level is info

@g3

Also record data in the log file; default log level is warning

@g4

Also record data in the log file; default log level is server

Example:

 

A

 

1

=to(4)

 

2

=output(A1)

Output “[1,2,3,4] .

3

=output@s(A1)

Won’t begin a new line after [1,2,3,4] is printed but go on printing A4’s info on same line.

4

=output@t(A1)

Output “2013-05-02 11:51:59  [1,2,3,4] .

5

=demo.query("select * from employee").export()

 

6

=output(A4)

Output all rows in the table sequence.

7

=output@g("abcd")

Output “[2022-09-05 14:21:26].

INFO: abcd”.

while recording the output content in the log file.