Outputs the specified strings or numeric expressions to a dialog or to a file.

Sintaxe:


Print [#FileName,] Expression1[{;|,} [Spc(Number As Integer);] [Tab(pos As Integer);] [Expression2[...]]

Parámetro:

FileName: Any numeric expression that contains the file number that was set by the Open statement for the respective file.

Expression: Any numeric or string expression to be printed. Multiple expressions can be separated by a semicolon. If separated by a comma, the expressions are indented to the next tab stop. The tab stops cannot be adjusted.

Number: Number of spaces to be inserted by the Spc function.

Pos: Spaces are inserted until the specified position.

No caso de haber un punto e coma ou unha coma despois da última expresión a imprimir, LibreOffice Basic almacena o texto nun búfer interno e continúa a execución do programa sen imprimir. Cando encontre outra instrución Print sen punto e coma ou coma no final, o programa imprime o texto dunha soa vez.

As expresións numéricas positivas imprímense cun espazo á esquerda. As negativas imprímense cun signo menos á esquerda. Se o tamaño dun intervalo non é suficiente para valores de punto flotante, a expresión numérica correspondente imprímese en notación exponencial.

Se a expresión que desexa imprimir excede un tamaño determinado, a visualización axústase automaticamente ata a liña seguinte.

Icona Nota

You can insert the Tab function, enclosed by semicolons, between arguments to indent the output to a specific position, or you can use the Spc function to insert a specified number of spaces.


Exemplo:

Precisamos da súa axuda!