Read and write text in a file text (Documentation Bugs and Problems)

by lrcvs, Saturday, February 23, 2013, 15:12 (1556 days ago)

Hi, Jim:

This is a test of reading and writing text to a file type.

question:
If the program "WriteLine", writes well records in the text file, because when read with "readline" writes a blank line on the screen?

Example:

cls
f$ = "pr1.txt"

open f$
reset
writeline "esta es la linea 1"
writeline "esta es la linea 2 dos"
writeline "esta es la linea 3 dos + uno"
close

c = 0
openb f$
while not eof
c = c + 1
print c + " "+ readline
end while
print
close

end


::::::::::::::::::::::::::::::::::::::

In the file, is Ok!!

esta es la linea 1
esta es la linea 2 dos
esta es la linea 3 dos + uno

:::::::::::::::::::::::::::::::::::::::

Now in the screen!

1 esta es la linea 1
"<<< white line >>>"
2 esta es la linea 2 dos
"<<< white line >>>"
3 esta es la linea 3 dos + uno

Read and write text in a file text

by lrcvs, Saturday, February 23, 2013, 15:29 (1556 days ago) @ lrcvs

Hi, Jim:

Is solved!

My mistake here:
I wrote >>> "readline"

... and I write "readline;"

Thank you!

:::::::::::::::::::::::::::::::::

Now, in the screen:

1 esta es la linea 1
2 esta es la linea 2 dos
3 esta es la linea 3 dos + uno

Now is Ok!!!

RSS Feed of thread
powered by my little forum