PRINT(#filenumber [,arglist])

Writes display-formatted data to a sequential file.


filenumberThe number of the file (Integer).
outputlist(Optional) The comma delimited data to insert into the file.

REMARKS
* If you end this statement with a semicolon a carriage return / line feed character is not inserted after each value.
* Data usually written to a file using this statement is usually read using either Input # or Line Input #.
* You can use the OPEN statement to open a text file.
* You can use the CLOSE statement to close a text file.
* You can use the WRITE statement to write data to a sequential file.
* You can use the SPC function to insert a specified number (n) of spaces when writing or displaying text.
* You can use the TAB function to move to the a particular column on the next output line.
* The equivalent .NET statement is Microsoft.VisualBasic.FileSystem.Print
* For the Microsoft documentation refer to learn.microsoft.com

Print #1 
Print # "Hello"
Print #1, "16"
Print #1, "'500','200'"
Print #1, True
Print #1, #1/5/2020#
Print #1, CVErr(2023)
Print #1, "one,two,three"

'Prints five leading spaces
Print #1, Spc(5); "5 leading spaces "

'Prints word at column 10
Print #1, Tab(10); "Hello"

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited Top