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 Professional Discussion / DBPro Core Command Array commands

Author
Message
Duffer
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 14th Jan 2012 13:07
Do commands like Empty Array and Array Insert At Top work with multi dimensional arrays ie. arrays with types?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Jan 2012 18:02
All array commands except for the the list/queue/stack commands work on multi-dimensional arrays. None of the standard array commands operate any differently for UDTs than plain type arrays.

Commands that work with multi-dimensional arrays:
- DIM
- UNDIM
- EMPTY ARRAY
- SAVE ARRAY
- LOAD ARRAY
- ARRAY INDEX TO TOP
- ARRAY INDEX TO BOTTOM
- NEXT ARRAY INDEX
- PREVIOUS ARRAY INDEX
- ARRAY INDEX VALID
- ARRAY COUNT

and less obviously (as they are simply aliases for ARRAY INDEX TO TOP/BOTTOM)
- ARRAY INDEX TO STACK
- ARRAY INDEX TO QUEUE

Duffer
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 14th Jan 2012 18:10
@ IanM,

Cheers for that. That does it then...

Writing some (rather a few) functions in DBPro (with your Matrix1 array commands naturally) to make my own custom database importing/exporting to xml and ini.

Your sort commands with arrays are v helpful - but I wanted to make sure that I had no empty array elements as I went, if you see what I mean. I think I can do that now.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Login to post a reply

Server time is: 2026-07-09 17:20:00
Your offset time is: 2026-07-09 17:20:00