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 / arrays and #include

Author
Message
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 17th Apr 2003 12:49 Edited at: 17th Apr 2003 12:53
(ignore title)
how can i store data that i want to use in an array separate from my main code??? would i use a .dat file? how would i do this

'You were born crying while people around you smiled'
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 17th Apr 2003 13:21
Look at the help file. LOAD ARRAY and SAVE ARRAY.

Only heroes live forever
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Apr 2003 11:51
how come this wont work

dim planet$(50,8)
load array "planet.txt",planet$(50,8)
i get an error saying my array name is invalid

'You were born crying while people around you smiled'
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 18th Apr 2003 12:52
you can only load an array the you had previously saved using the save array command...

also..not sure...but don't dim it before you LOAD ARRAY either

The 3D Modeler's Group : http://groups.yahoo.com/group/3dModeler/
The Unofficial DB Newsgroup : http://groups.yahoo.com/group/DBMag/
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Apr 2003 13:51
Works fine in DBPro, so you must be using DB Classic...

Use 'load array "planet.txt",planet$(0)' instead.
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 18th Apr 2003 18:51
thanks i don't get the error any more
i am using classic, does setting the parameter to 0 make the array any size????

'You were born crying while people around you smiled'
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Apr 2003 21:21
No - you need to dimension your array as you have been doing before you load data into it.

Login to post a reply

Server time is: 2024-11-24 10:49:55
Your offset time is: 2024-11-24 10:49:55