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 / Array Problems.

Author
Message
Images on DB Classic
21
Years of Service
User Offline
Joined: 2nd Nov 2003
Location:
Posted: 8th Nov 2003 23:23
Hi there. Is there a command to know the size of an array?. Thanks!

JCRG
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 9th Nov 2003 04:28
nope... I've tried before, and it isn't possible, sorry...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 9th Nov 2003 19:49
RATS!

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 9th Nov 2003 20:16
just keep trying to do stuff to an array while constantly incremented the index values, eventually you'll get an array out of bounds error, then you know you've gone too far


Go on, click on my signature image, you know you want to
Favourite smiley>>>
Images on DB Classic
21
Years of Service
User Offline
Joined: 2nd Nov 2003
Location:
Posted: 10th Nov 2003 20:48
I know that. What I want to do is to know the size of an array without an error message.

JCRG
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 11th Nov 2003 03:00
question: why do you need to do this?

Two words, moo.
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 11th Nov 2003 16:34
sorry, you have to keep count with an index variable.

Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 17th Nov 2003 16:20
Is this any help? I found it on the reference CD that comes with beginner's guide to darkbasic game programming...

ARRAY COUNT(Array Name)

Description Returns the number of items within an array. Returns Integer

Kevin
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Nov 2003 07:55
Hmmm, never heard of it, and apparently, neither has DarkBASIC, lol...

Good try though...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 18th Nov 2003 11:34
Well I took it off the CD that came with the book, it didn't explain how to use it though, perhaps you have to set a Variable = ARRAY COUNT(myString$) or something?

I didn't make it up honest, there's no saying that the author of the book didn't though
Kevin Cross
21
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 18th Nov 2003 12:37
Just checked it's a db professional command...

http://darkbasicpro.thegamecreators.com/?f=commands
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Nov 2003 12:41
Yeah, i knew it was a DBPro command, because i have used it before.

But, I'd never heard of it in relation to DBClassic.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-21 17:20:03
Your offset time is: 2025-05-21 17:20:03