![]() |
how can I call a function with parameter record in another unit ?
Hi,
How can I call a function with parameter record in another unit? For example: TGrUser = record Name : string [20]; Descr : string [100]; R1 : boolean; end; function fGrUser(sS:string;writeUser: TGrUser); begin ... end; If I call the function in the unit1 where is create type record and function it work; if I call the function from unit2 I have the message error: "E2010 incompatible types ...". The type record from unit2 is declarated in unit2. bye ObiWanKby |
AW: how can I call a function with parameter record in another unit ?
is the type declared twice?
if yes, try to declare it only in one unit! |
AW: how can I call a function with parameter record in another unit ?
That' s it. You can either declare the type in the interface-section of one of your units or create a separate unit for this type, which you add in both "uses"-clauses.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz