描述
将指定数量的换行符一个TextStream文件.
FreeBASIC 语法
FUNCTION WriteBlankLines (BYVAL numLines AS LONG) AS HRESULT |
参数
numLines |
LONG.换行字符要写入的文件数. |
引用文件
CTextStream.inc
示例
#include "windows.bi"
#include "Afx/AfxScrRun.bi"
#include "Afx/CTextStream.inc"
using Afx
' // Create an instance of the CTextStream class
DIM pTxtStm AS CTextStream
' // Create a text stream
DIM cwsFile AS CWSTR = ExePath & "\Test.txt"
pTxtStm.Create(cwsFile, TRUE)
' // Write a string and an end of line to the stream
pTxtStm.WriteLine "This is a test."
' // Write more strings
pTxtStm.Write "This is a string."
pTxtStm.Write "This is a second string."
' // Write two blank lines (the first will serve as an end of line for the previous write instructions)
pTxtStm.WriteBlankLines 2
pTxtStm.WriteLine "This is the end line."
PRINT "Press any key..."
SLEEP