Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uncorrectly read file
#5
Thank you Tomaaz and Marcus for the solution.

Let me code it in this way :
Code:
'==================================
'Solutions (by Tomaaz and Marcus)
'use system type to read text file
'==================================

set window "read story.txt",400,400         

'chr(10) = ascii for \n, New Line
wln "File : Story.txt"
lines = split(system("type story.txt"), chr(10))
for k = 0 to sizeof(lines) - 1 wln lines[k]

wln
'put a space character in the beginning of an empty line (on the text file)
'so that every empty space line is written as it is.
wln "File : Story_.txt"
lines = split(system("type story_.txt"), chr(10))
for k = 0 to sizeof(lines) - 1 wln lines[k]

temp = rln()


Attached Files
.txt   story.txt (Size: 149 bytes / Downloads: 0)
.txt   story_.txt (Size: 151 bytes / Downloads: 0)
Reply


Messages In This Thread
Uncorrectly read file - by 1micha.elok - 03-23-2024, 11:30 AM
RE: Uncorrectly read file - by Marcus - 03-23-2024, 01:46 PM
RE: Uncorrectly read file - by Tomaaz - 03-23-2024, 02:28 PM
RE: Uncorrectly read file - by Marcus - 03-23-2024, 03:40 PM
RE: Uncorrectly read file - by 1micha.elok - 03-24-2024, 09:09 AM
RE: Uncorrectly read file - by Tomaaz - 03-24-2024, 05:28 PM
RE: Uncorrectly read file - by 1micha.elok - 03-24-2024, 11:55 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)