Assembly: Microsoft.VisualBasic (in microsoft.visualbasic.dll)
Required. The number of spaces to insert before displaying or printing the next expression in a list.
Return ValueUsed with the Print or PrintLine function to position output.
For more detailed information, see the Visual Basic topic SPC Function.
If Count is less than the output line width, the next print position immediately follows the number of spaces printed. If Count is greater than the output line width, SPC calculates the next print position using the formula:
For example, if the current print position is 24, the output line width is 80, and you specify SPC(90), the next print will start at position 34 (current print position + the remainder of 90/80). If the difference between the current print position and the output line width is less than Count (or Count Mod width), the SPC function skips to the beginning of the next line and generates spaces equal to Count – (width – currentprintposition).
Make sure your tabular columns are wide enough to accommodate wide letters.
This example uses the SPC function to position output in a file and in the Output window.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.