Put# Statement

๋ ˆ์ฝ”๋“œ๋ฅผ ์ƒ๋Œ€ ํŒŒ์ผ์— ์“ฐ๊ฑฐ๋‚˜ ๋ฐ”์ดํŠธ ์‹œํ€€์Šค๋ฅผ ์ด์ง„ ํŒŒ์ผ์— ์”๋‹ˆ๋‹ค.

tip

Use Print# statement to print data to a sequential text file. Use Write# statement to write data to a sequential text file with delimiting characters.


Syntax:

Put Statement diagram


Put [#]fileNum, [recordNum|filePos], variable

Parameters:

fileNum: Any integer expression that defines the file that you want to write to.

recordNum, filePos: For relative files (random access files), the number of the record that you want to write.

์ด์ง„ ํŒŒ์ผ(์ด์ง„ ์•ก์„ธ์Šค)์˜ ๊ฒฝ์šฐ, ์“ฐ๊ธฐ๋ฅผ ์‹œ์ž‘ํ•  ํŒŒ์ผ์˜ ๋ฐ”์ดํŠธ ์œ„์น˜์ž…๋‹ˆ๋‹ค.

variable: Name of the variable that you want to write to the file.

์ƒ๋Œ€ ํŒŒ์ผ์— ๋Œ€ํ•œ ์ฐธ๊ณ  ์‚ฌํ•ญ: ์ด ๋ณ€์ˆ˜์˜ ๋‚ด์šฉ์ด Open ๋ฌธ์˜ Len ์ ˆ์— ์ง€์ •๋œ ๋ ˆ์ฝ”๋“œ ๊ธธ์ด์™€ ์ผ์น˜ํ•˜์ง€ ์•Š์„ ๊ฒฝ์šฐ ์ƒˆ๋กœ ๊ธฐ๋ก๋œ ๋ ˆ์ฝ”๋“œ์˜ ๋ ๋ถ€๋ถ„๊ณผ ๋‹ค์Œ ๋ ˆ์ฝ”๋“œ ์‚ฌ์ด์˜ ๊ณต๋ฐฑ์ด ์“ฐ๋ ค๋Š” ํŒŒ์ผ์˜ ๊ธฐ์กด ๋ฐ์ดํ„ฐ๋กœ ์ฑ„์›Œ์ง‘๋‹ˆ๋‹ค.

์ด์ง„ ํŒŒ์ผ์— ๋Œ€ํ•œ ์ฐธ๊ณ  ์‚ฌํ•ญ: ๋ณ€์ˆ˜ ๋‚ด์šฉ์ด ์ง€์ •ํ•œ ์œ„์น˜์— ๊ธฐ๋ก๋˜๊ณ  ๋งˆ์ง€๋ง‰ ๋ฐ”์ดํŠธ์˜ ๋ฐ”๋กœ ๋’ค์— ํŒŒ์ผ ํฌ์ธํ„ฐ๊ฐ€ ์‚ฝ์ž…๋ฉ๋‹ˆ๋‹ค. ๋ ˆ์ฝ”๋“œ ๊ฐ„์— ๊ณต๋ฐฑ์ด ๋‚จ์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Example:

Please support us!