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.


Write Statement diagram

Write [#fileNum] {,|;} expression [, โ€ฆ]


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.

ํ‘œํ˜„์‹ ๋ชฉ๋ก์ด ์ƒ๋žต๋œ ๊ฒฝ์šฐ Write ๋ฌธ์€ ํŒŒ์ผ์— ๋นˆ ์ค„์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

์‹ ๋ชฉ๋ก์„ ์ƒˆ ํŒŒ์ผ์ด๋‚˜ ๊ธฐ์กด ํŒŒ์ผ์— ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด ํŒŒ์ผ์„ Output ๋˜๋Š” Append ๋ชจ๋“œ๋กœ ์—ด์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์ž‘์„ฑํ•˜๋Š” ๋ฌธ์ž์—ด์€ ๋”ฐ์˜ดํ‘œ๋กœ ๋ฌถ์ด๊ณ  ์‰ผํ‘œ๋กœ ๊ตฌ๋ถ„๋ฉ๋‹ˆ๋‹ค. ํ‘œํ˜„์‹ ๋ชฉ๋ก์— ์ด ๊ตฌ๋ถ„ ๊ธฐํ˜ธ๋ฅผ ์ž…๋ ฅํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

๊ฐ Write ๋ฌธ์—๋Š” ๋งˆ์ง€๋ง‰ ํ•ญ๋ชฉ์œผ๋กœ ์ค„ ๋ ๊ธฐํ˜ธ๊ฐ€ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.

์†Œ์ˆ˜์ ์„ ๊ฐ–๋Š” ์ˆ˜๋Š” ๊ตญ๊ฐ€๋ณ„ ์„ค์ •์— ๋”ฐ๋ผ ๋ณ€ํ™˜๋ฉ๋‹ˆ๋‹ค.


Please support us!