Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need help saving matrix code

Author
Message
cabbage
21
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 27th Jun 2003 02:50
I'm working on a matrix editor at the mo (looking good so far) but I'm having extreme problems saving the matrix data out to file. The code I've got works fine if the matrix has zero height but, as soon as it hits a line with heights, it writes that line to the file then quits the program 0 then gg$=gg$+","+str$(matheight(m,n))
next m
gg$="Data "+gg$
write string 1,gg$
next n
close file 1
return
cabbage
21
Years of Service
User Offline
Joined: 18th Jun 2003
Location: United Kingdom
Posted: 27th Jun 2003 02:51
delete file "matrix.dba"
open to write 1,"matrix.dba"
for n = 0 to ytiles
for m = 0 to xtiles
if m=0 then gg$=str$(matheight(m,n))
if m>0 then gg$=gg$+","+str$(matheight(m,n))
next m
gg$="Data "+gg$
write string 1,gg$
next n
close file 1
return

Login to post a reply

Server time is: 2024-09-20 13:18:35
Your offset time is: 2024-09-20 13:18:35