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 / no array declaration allowed within type?

Author
Message
Lancewrath
21
Years of Service
User Offline
Joined: 30th Dec 2002
Location:
Posted: 26th Jul 2008 20:36
is there anyway to declare an array from within a type?

obvioussly this doesnt work but it would be cool if it did



LIKE OMFG IM TEH KING OF TEH INTARWEB!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jul 2008 02:08
it would be very nice to do that, but unfortunately you cannot.


DarkTy
18
Years of Service
User Offline
Joined: 28th Feb 2006
Location:
Posted: 16th Oct 2008 01:39
Is possible?

In DarkBasic Classic it was possible, make array in element of type list.
I had made a codesnippet that view type sub element in code snippet area.

I'm interressing to know if is possible in DBPro
or if is not knowed how to do it,
or if is not possible.

Esempio:


<<La Perspicacia è l'Arte dell'Intelligenza>>
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Oct 2008 15:23
Be nice - they're both right.

The arrays-in-types for DBC were an addition to the Darkedit IDE, which would run the code through a preprocessor and convert all the types into individual variables, typed arrays into individual arrays etc.

There is no preprocessor for DBPro, so although you can do the equivalent, it's time consuming and prone to error... although IIRC, the DBC/Darkedit preprocessor was prone to error too.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Oct 2008 21:37
I wrote a tutorial about types, it's in the Tutorials Thread at the top of this page. It has some tips about how you can work around this problem.

DarkTy
18
Years of Service
User Offline
Joined: 28th Feb 2006
Location:
Posted: 16th Oct 2008 22:54
Thank you.

I had choosed to replace all arrays-in-Type into variables converted in array in 2 and 3 dimensions, because it's only one simple solution.

Condition Necessary For made it:
1) Xdarkedit.exe rename Darkedit.exe
2) Menu\Edit\Edit Option... for open option dialog
3) check on
[*True/False] Type extended syntax
[*True/False] Define exetended syntax
[*True/False] Global extended syntax
[Ok]
4) Execute + click on button [Replace Source]
5) Reload source on the DbPro and execute.

Now my Type is became arrays to 2 and 3 dimension.
I had save a my old projet , but I hope that in the future to come in DbPro there is the possible to use array-in-Type because is more simple for me.

Again, Thank you.

<<La Perspicacia è l'Arte dell'Intelligenza>>

Login to post a reply

Server time is: 2024-11-25 16:36:28
Your offset time is: 2024-11-25 16:36:28