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 / DATA & READ - Why?

Author
Message
HKlown
21
Years of Service
User Offline
Joined: 18th Jan 2003
Location: United States
Posted: 4th Jul 2003 02:47
Can someone explain why you would want to use the DATA and READ statements in a program? No matter how many times I read over the description, I just don't see how this is a reasonable replacement for just storing data to a variable right away.
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 4th Jul 2003 03:10
Data/Read are more for the storing of collections of built in data. A simple example that comes to mind would be storing a list of names or 'special' words within your game.

Once you have them within an array you can search/delete/change/add more as your program continues. A lot more flexible than keeping such information in variables.

While this example is pretty small, and could certainly be done without the use of read/data. Imagine if you had 100, 500 or 1000 bits of data you needed to store inside your program..




l8r,
Kevin Picone
[url]www.underwaredesign.com[/url]
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 4th Jul 2003 10:37
alot of people use the data and read commands for making levels for simple games.

hi guys
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 4th Jul 2003 21:36
I generally dont use Data and read because they are not versatile enough. I prefer to store as much info as i can in datafiles and retrieve them at runtime

"We are getting aggravated"
"Yes, we are"

Login to post a reply

Server time is: 2024-11-24 20:38:26
Your offset time is: 2024-11-24 20:38:26