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 / multidimensional arrays (DBP)

Author
Message
liquid
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location:
Posted: 10th Mar 2006 15:47
i'm new to dark basic language, and i'd like to know how to make arrays and multidimensional arrays (my idea is to make a 2d map for a tetris clone)

thanks!

i'm a n00b
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Mar 2006 23:51
Use the dim command to make an array. Type in the array's name and then in parenthesis give how much information you want it to hold. If you want the array to be multi-dimensional use a comma to seperate the dimensions. This demonstrates how to create a multi-dimensional array...



If you want an array to hold more than one type of value at each position in the array then you use the type command.



Insanity is just a state of mind
liquid
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location:
Posted: 11th Mar 2006 13:34
thanks alot

i'm a n00b

Login to post a reply

Server time is: 2024-09-24 17:30:50
Your offset time is: 2024-09-24 17:30:50