Board index » delphi » open array parameters?

open array parameters?

Will Delphi let you pass and open array of a user defined type to a
function?  I'm trying to do this, and keep getting an "incompatible type"
compiler error at the function call.  I've checked the spelling and paramter
list, and everything is OK.  I've set up a pass of an open array of integers
to the function to check it and it works.

Thanks for any help

Rob M.

 

Re:open array parameters?


D3 and later will let you pass open arrays. Post your code, and someone
will probably be able to figure it out.

Dave

Quote
rwm wrote:

> Will Delphi let you pass and open array of a user defined type to a
> function?  I'm trying to do this, and keep getting an "incompatible type"
> compiler error at the function call.  I've checked the spelling and paramter
> list, and everything is OK.  I've set up a pass of an open array of integers
> to the function to check it and it works.

> Thanks for any help

Re:open array parameters?


In article <714n68INN...@oasys.dt.navy.mil>,
  "rwm" <micha...@dt.navy.mil> wrote:

Quote
> Will Delphi let you pass and open array of a user defined type to a
> function?

         Yes.

Quote
> I'm trying to do this, and keep getting an "incompatible type"
> compiler error at the function call.  I've checked the spelling and paramter
> list, and everything is OK.  I've set up a pass of an open array of integers
> to the function to check it and it works.

         You're doing something wrong, hard to say what without seeing
any code. Is this a var parameter? Are you aware that two types defined
in different units count as _different_ types, even if the type
definitions are identical? (This didn't make sense to me for a while -
actually it does make sense, but whether it makes sense or not it's
true.)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:open array parameters?


Perhaps you can post your code?

Charles  Johnson

Other Threads