Contents
Index 🔎︎

# Write# Statement

Writes data to a sequential text file with delimiting characters.

Use Print# statement to print data to a sequential text file. Use Put# statement to write data to a binary or a random file.

### Syntax:

    Write [#fileNum] {,|;} expression [, …]

### Parameters:

fileNum: Any numeric expression that contains the file number that was set by the Open statement for the respective file.

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

यदि अभिव्यक्ति सूची हटाइएको खण्डमा, लेख्नुहोस्स्टेटमेन्ट खाली लाइनलाई फाइलमा थप्छ ।

अभिव्यक्ति सूचीमा नयाँ वा अवस्थित फाइललाई थप्नलाई फाइलनिर्गत वा जोड्नुहोस्मोडमा खोल्नु पर्दछ ।

लेखिएको कथनहरू उद्गार चिन्हद्वारा समावेश गरीन्छ भने अल्पविरामद्वारा छुट्टिएको हुन्छ । यो सूचीमा डेलिमिटरहरू प्रयोग गर्न आवश्यक छैन ।

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

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

### Example:

    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

सम्बन्धित शीर्षक

Open Statement

Print# Statement

Put# Statement

Close Statement