Widthf Num length

This is another useful statement that applies to sequential files only. The Width() function sets the maximum line length that can be written to a file. The maximum line length is specified by the second argument, length. A line with fewer characters than length is stored to the file as is. Longer lines are broken; Visual Basic automatically inserts newline characters to enforce the specified maximum line length. Use this function with the Print() and Write() functions, which append data to the same line, to limit the length of each data line. Even better, you should use the PrintLine() and Write-Line() methods to control how much information goes to the same line.

0 0

Post a comment