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 Discussion / DATA and READ

Author
Message
Atari
22
Years of Service
User Offline
Joined: 19th Mar 2003
Location: - Please Select -
Posted: 25th Mar 2003 23:32
What are the DATA and READ statements?I read the help and i program in several languages(c/c++, pascal, java etc...) but can't understand what is that.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Mar 2003 00:02
its basically a way of adding specific data into an array for use
kinda like saving the arrays after they're filled and load them later

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Atari
22
Years of Service
User Offline
Joined: 19th Mar 2003
Location: - Please Select -
Posted: 26th Mar 2003 00:42
i still can't understand...it's looking the same thing as an array data type but with diferents data types stored in the same list.Is it?
andrew11
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 26th Mar 2003 00:44
Raven didn't explain it.

Say you had a mario game with 10 different sprites (Mario, Koopa, Goomba, Item, etc.)

You wouldn't want to say "Sprite 112,12,14,13" hundreds of times.

You could write your level like this, where 5 = Mario, 3 = box, and 1 = Ground:



This shows the positions of each tile.

Then use read:



The x and y have nothing to do with read, but it makes it easier to map out the level.

Hope this helps

"All programmers are playwrights and all computers are lousy actors." -Anon.

<--- Just.. changed.. my. avatar... Ouch, my head!
Atari
22
Years of Service
User Offline
Joined: 19th Mar 2003
Location: - Please Select -
Posted: 26th Mar 2003 02:24
Now i understand.Thank You.

Login to post a reply

Server time is: 2025-05-17 00:14:14
Your offset time is: 2025-05-17 00:14:14