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 / How do you set multiple strings to an array on one line?

Author
Message
fafaffy
12
Years of Service
User Offline
Joined: 21st Jul 2008
Location:
Posted: 20th Jan 2012 18:06
To cut straight to the point, this is what I would like to achieve:


but whenever I output the array, it always comes out to be:
which isn't what I want, is there anyway to accomplish this?

I know you can do:

but I rather not code my program in this fashion.
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Jan 2012 23:07
Not really sure what you mean, maybe if you explained what you're doing with these strings that might help me.

Join DNG today! We are a game development team open to all. Visit our Headquarters to learn more.
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Jan 2012 02:03 Edited at: 21st Jan 2012 02:11
@faffy
DBC doesn't allow you to define arrays by lists like in C or Python.

The closest you can get is to store your list in data statements or a file then read the values back - I realize it's really not the same:



Enjoy your day.

Login to post a reply

Server time is: 2020-08-15 12:17:25
Your offset time is: 2020-08-15 12:17:25