PDA

View Full Version : Why can't I get away with this?



Oldbitcollector (Jeff)
01-22-2011, 11:34 PM
r := sdfat.popen(string("games.csv"),"r")
repeat
r := sdfat.pgetc
if r < 0
StringSend(0, 13)
quit
if r > 0
StringSend(0, r)
'pst.char(r)



Naturally this is at root of reading a file from SD and displaying it.

I'm sure I should be thinking about this different somehow, but I've never worked "backend" of a webserver.

OBC

Oldbitcollector (Jeff)
01-23-2011, 12:02 AM
Bah!

Just needed to think about it out loud.. (thanks for listening..) <SMIRK>



x:=0
bytefill(@mydata,0,150)

r := sdfat.popen(string("games.csv"),"r")

repeat
r := sdfat.pgetc

if r < 0
'StringSend(0, 13)
quit

if r > 0
mydata[x]:=r
x++

if r == 44
StringSend(0, @mydata)
'Stringsend(0,string("***",CR,CR))
bytefill(@mydata,0,150)
x:=0