gl gl gl it gl ca gl en en gl en gl en en en en gl gl gl en ca en en gl gl gl gl gl gl en en en gl
Outputs the specified strings or numeric expressions to the screen or to a sequential file.
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.
Print [#filenum,] expression1[{;|,} [Spc(number As Integer);] [Tab(pos As Integer);] [expression2[...]]
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.
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.
Sub ExamplePrint Print "ABC" Print "ABC","123" i = FreeFile() Open "C:\Users\ThisUser\Temp.txt" For Output As i Print #i, "ABC" Close #i End Sub
Sub ExamplePrint Print "ABC" Print "ABC","123" i = FreeFile() Open "~/temp.txt" For Output As i Print #i, "ABC" Close #i End Sub
Precisamos da súa axuda!
Impressum (Legal Info) | Privacy Policy | Statutes (non-binding English translation) - Satzung (binding German version) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Mozilla Public License v2.0. “LibreOffice” and “The Document Foundation” are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy. LibreOffice was based on OpenOffice.org.
Help content debug info:
This page is: /text/sbasic/shared/03010103.xhp
Title is: Instrución Print#