Recent

Author Topic: How to access a RecordType from another unit ?  (Read 1666 times)

FrankBKK

  • New Member
  • *
  • Posts: 22
How to access a RecordType from another unit ?
« on: June 22, 2021, 04:16:14 pm »
I want to use a Record Type defined in UnitA  by a Procedure in another unit - how do I do that ?

Something like below gives me an 'Identifier not found ...'



Code: Pascal  [Select][+][-]
  1. Unit A:  
  2. type TSample = record
  3.   some : String ;
  4.   data : Integer;
  5.   here : Byte ;
  6. end ;
  7.  
  8. var
  9. aTest : TSample ;
  10.  
  11. Procedure DoSomething
  12. begin
  13.   UpdateData(aTest) ;
  14. end
  15.  
  16.  
  17. Unit B:
  18. procedure UpdateData(var aSample:TSample) ;

FrankBKK

  • New Member
  • *
  • Posts: 22
Re: How to access a RecordType from another unit ?
« Reply #1 on: June 22, 2021, 04:28:29 pm »
Sorry, I found it - forgot the uses clause in the implementation section ;-)

 

TinyPortal © 2005-2018