Write Statement

Writes data to a sequential file.

කාරක රීතිය:

Write [#FileName], [Expressionlist]

පරාමිතීන්:

ගොනු අංකය: අදාළ ගොනුව සඳහා විවෘත ප්‍රකාශනය මඟින් පිහිටවූ ගොනු අංකය අඩංගු ඕනෑම සංඛ්‍යාත්මක ප්‍රකාශනයක්.

Expressionlist: Variables or expressions that you want to enter in a file, separated by commas.

If the expression list is omitted, the Write statement appends an empty line to the file.

To add an expression list to a new or an existing file, the file must be opened in the Output or Append mode.

Strings that you write are enclosed by quotation marks and separated by commas. You do not need to enter these delimiters in the expression list.

Each Write statement outputs a line end symbol as last entry.

Numbers with decimal delimiters are converted according to the locale settings.

උදාහරණය:

Sub ExampleWrite

Dim iCount As Integer

Dim sValue As String

    iCount = Freefile

    Open "C:\data.txt" For Output As iCount

    sValue = "Hamburg"

    Write #iCount,sValue,200

    sValue = "New York"

    Write #iCount,sValue,300

    sValue = "Miami"

    Write #iCount,sValue,450

    Close #iCount

End Sub