Name
Print, PrintLine Procedures
Class
Microsoft.VisualBasic.FileSystem
Syntax
Print(filenumber, [outputlist( )]
) PrintLine(filenumber, [outputlist( )]
)
-
filenumber
Use: Required
Data Type: Integer
Any valid file number.
-
outputlist
Use: Optional
Type: Parameter Array
A comma-separated list of expressions to output to a file.
outputlist
can be either a scalar variable, a list of comma-delimited expressions, or a parameter array. Its comma-delimited expressions or parameter array can include the following:-
Spc(
n
)
Use: Optional
Insert
n
space characters before expression.-
Tab(
n
)
Use: Optional
Position the insertion point either at the next print zone (by omitting
n
) or at column number (n
).-
expression
Use: Optional
Data Type: Any
The data expression to output.
Description
Outputs formatted data to a disk file opened for Append or Output.
Rules at a Glance
Print
andPrintLine
are identical, except thatPrintLine
advances to the next line after printing.The
Tab(
n
)
argument does not actually insert any tab characters (Chr(9)
); instead, it fills the space from the end of the last expression to columnn
(or to the start of the next print zone) with space characters.The
Print
procedure uses the locale settings of the current system to format dates, times, and numbers, using the correct separators.outputlist
can be either a comma-separated list of expressions or a parameter array.
Example
The following code shows how to use the Print
procedure to write to a file using both a comma-separated ...
Get VB .NET Language in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.