ClassMicrosoft.VisualBasic.FileSystem SyntaxPrint(fileNumber, output) PrintLine(fileNumber[, output])
DescriptionThe Print and PrintLine procedures output formatted data to a disk file opened in Append or Output mode. The PrintLine version also appends line termination characters. In addition to standard data, output can include the SPC and TAB functions, discussed in their own entries in this chapter. Usage at a Glance
ExampleThe following code writes some simple formatted data using the PrintLine procedure and the TAB function. Dim fileID As Integer = FreeFile( ) FileOpen(fileID, "c:\data.txt", OpenMode.Output, OpenAccess.Write) PrintLine(fileID, " 1 2") PrintLine(fileID, "12345678901234567890") PrintLine(fileID, "--------------------") PrintLine(fileID, 1, TAB(10), 10) PrintLine(fileID, 100, TAB(10), 1000) FileClose(fileID) This code generates the following output. 1 2 12345678901234567890 -------------------- 1 10 100 1000 Version Differences
See AlsoWrite, WriteLine Procedures |