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.

DarkBASIC Professional Discussion / Last problem(saving array speed)

Author
Message
fuedone
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location:
Posted: 27th Oct 2003 14:05
I have a multidimensional array, i recently upgraded from classic to professional

dim savpos(50,50)

how do i save this in darkbasic pro, in classic, i used

for r = 0 to 49
for l = 0 to 49
save array "c:\array.fue" , savpos(l,r)
next l
next r

it takes about 4 minutes to work(and doesnt work properly), in classic it takes 5 seconds(and works)

any help at all would be appreciated,
its the last part i need for my world builder, ive finished the rest

[email protected] ass if you wantto talk about something
las6
23
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 27th Oct 2003 14:13
agh!

Save Array saves the Whole array, and not just the position you define. (actually that doesn't matter at all)
Now you are doing it 2500 times! that's 2499 times more than you need to.

erase that and use this instead:
save array "c:\array.fue" , savpos(0)
OR
save array "c:\array.fue" , savpos(0,0)
OR
save array "c:\array.fue" , savpos(50,50)

Not sure..But I don't think you don't need to give the dimensions.

Keyboard not detected. Press F1 to continue.
fuedone
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location:
Posted: 27th Oct 2003 14:34
thankyou im saved

in classic it doesnt work like that

ive been here for 2 days trying to push every last bit of speed out of it

[email protected] ass if you wantto talk about something
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 27th Oct 2003 19:15
it does work like that in classic from what i remember


Go on, click on my signature image, you know you want to
Favourite smiley>>>

Login to post a reply

Server time is: 2026-07-26 20:17:35
Your offset time is: 2026-07-26 20:17:35