Instruci贸n Print#

Outputs the specified strings or numeric expressions to the screen or to a sequential file.

tip

Use Put# statement to write data to a binary or a random file. Use Write# statement to write data to a sequential text file with delimiting characters.


Sintaxe:

Print syntax


Print [#filenum,] expression1[{;|,} [Spc(number As Integer);] [Tab(pos As Integer);] [expression2[...]]

Par谩metros:

filenum: 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!