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 / I have a problem with making an array of TYPE.

Author
Message
NullO
23
Years of Service
User Offline
Joined: 25th Jun 2003
Location:
Posted: 26th Jun 2003 07:39 Edited at: 26th Jun 2003 07:40
Ok, let's say I make a TYPE and then try to create an array based on that TYPE:



This seems like it should work(and the help files suggest that it does), but everytime I try to compile, it gives me an error

#100035: Type definition 'MyType' could not be understood

I can't seem to find anyone else with this particular problem after browsing the boards, and I've already applied patch 4. Is there something I'm missing here?

NullO
23
Years of Service
User Offline
Joined: 25th Jun 2003
Location:
Posted: 26th Jun 2003 07:58
After a little testing, I've also noticed the following:

1. I CAN create an array of MyType as long as it's not within a function.

2. But when outside a function, I cannot create an array within MyType.

It's a lose-lose situation.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jun 2003 10:14
Your little piece of code compiles fine for me - you must be doing something more for it not to work.

You'll need to post a little more code I'm afraid
Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 26th Jun 2003 14:44 Edited at: 26th Jun 2003 14:44
Never seen it done like that try



Or something similar.

Bloodshot
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United Kingdom
Posted: 26th Jun 2003 22:12 Edited at: 26th Jun 2003 22:17
NullO, I tested the use of a type declared at the beginning of the program and used it to structure an array inside a function with no problem:




You're not trying to access your array like this are you?

Wrong way:
Print MyTypeArray.A$(X)

Correct way:
Print MyTypeArray(X).A$

Else check for other typos!

Login to post a reply

Server time is: 2026-07-16 16:19:43
Your offset time is: 2026-07-16 16:19:43