03-24-2024, 09:09 AM
Thank you Tomaaz and Marcus for the solution.
Let me code it in this way :
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()