Conteníu

# Print# Statement

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.

### Syntax:

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

### Parameters:

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.

Si apaez un caráuter de puntu y coma o una coma tres la última espresión qu'imprentar, LibreOffice Basic almacena'l testu nuna memoria entemedia interna y sigue la execución del programa ensin imprentar. Cuando s'atopa otra instrucción Print ensin un caráuter de puntu y coma o una coma a la fin, imprímese tol testu nuna operación.

Les espresiones numbériques positives imprímense precedíes per un espaciu. Les espresiones negatives imprímense precedíes por un signu menos. Si entepásase un rangu determináu pa valores de coma flotante, la espresión numbérica respectiva imprentar en notación esponencial.

Si la espresión qu'imprentar entepasa un llargor determináu, la pantalla axústase automáticamente hasta la llinia siguiente.

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.

### Example:

    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

Temes rellacionaos

Close Statement

Put# Statement

Open Statement

Write# Statement