BV508 & SD card how to read file by line ? August 06, 2015 12:34PM |
Registered: 10 years ago Posts: 16 |
dim f, s$[128] ,count f = fopen("CONF.txt","r") fread(s$,40,*count,f) print s$ // fclose(f)
Re: BV508 & SD card how to read file by line ? August 06, 2015 05:02PM |
Admin Registered: 12 years ago Posts: 351 |
function x(line) dim f, a$[128], j f=fopen("start.bas","r") if f <> 0 then for j = 0 to line fgets(a$,f) next print a$ endif endfunction x will return the line number requested, there is no error checking for end of file to make things simple in this example.
Re: BV508 & SD card how to read file by line ? August 10, 2015 08:46PM |
Registered: 10 years ago Posts: 16 |
Re: BV508 & SD card how to read file by line ? September 11, 2015 03:39PM |
Registered: 10 years ago Posts: 16 |
Re: BV508 & SD card how to read file by line ? September 12, 2015 09:16AM |
Admin Registered: 12 years ago Posts: 351 |