Write# Statement

Writes data to a sequential text file with delimiting characters.

tip

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 Statement diagram


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.

Bỏ sót biểu thức thì câu lệnh Write (Ghi) phụ thêm một dòng rỗng vào tập tin.

Để thêm một danh sách biểu thức vào một tập tin mới hoặc tập tin đã tồn tại, tập tin phải được mở ở chế độ Kết xuất hoặc Phụ thêm.

Các chuỗi bạn ghi sẽ tự động được kẹp giữa hai dấu nháy kép và phân cách bằng dấu phẩy. Bạn không cần nhập các ký tự phân cách vào danh sách biểu thức.

Mỗi câu lệnh Write (Ghi) thì xuất một ký hiệu kết thúc dòng dưới dạng mục nhập cuối cùng.

Con số có dấu tách thập phân được chuyển đổi tùy theo thiết lập miền địa phương.

Example:

Please support us!