
448
|
Chapter 12: The Language Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Usage at a Glance
• While number can be zero (in which case, the function returns the empty string), a
runtime error occurs if
number is negative.
• One of the custom constructors for the String data type can also be used to create
a string of spaces. The following statement creates a new string with 10 spaces.
Dim blankString As New String(" "c, 10)
See Also
SPC Function, StrDup Function
SPC Function
Class
Microsoft.VisualBasic.FileSystem
Syntax
Dim result As SPCInfo = SPC(count)
count (required; Short)
The number of spaces to insert before outputting the next data value
Description
The SPC function inserts spaces between expressions in a Print or PrintLine procedure.
Usage at a Glance
• SPC is generally only useful with the Print or PrintLine procedures.
• If the SPC function moves the current position past the end of the output width,
count is first reduced using the formula count Mod width. In some cases, this may
still bring the print position to the next line.
• Use the
TAB function to format data in columns, starting at specific positions on
each line.
Version Differences
In Visual Basic 2005, the My.Computer.FileSystem object provides more robust access
to file management features.
See Also
Print, PrintLine Procedures, TAB Function
Split Function
Class