7.0兄弟会之剑绝版了吗:VB中的SPC()函数怎么用?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/12 10:57:39

Spc 函数确定在文件或立即窗口中的输出位置
例子:

' Spc 函数可以和 Print # 语句一起使用。
Open "TESTFILE" For Output As #1 ' 打开输出文件。
Print #1, "10 spaces between here"; Spc(10); "and here."
Close #1 ' 关闭文件。

下列语句在显示到调试窗口(使用 Print 方法)的文本之前加 30 个空格。

Debug.Print Spc(30); "Thirty spaces later. . ."

查MSDN

打印或者输出n个空格