Let me give an example where I am stuck.
I have 3 units, A, B, and C
My unit B is a unit only for records and numerate variables.
My Unit B is declared in both units, A and C and it has a record
TCadPal = record
id : integer;
sentence : string;
My unit A has a variable like this:
EstPal : Array of TCadPal;
The Unit C is a unit only for functions and procedures that can be called / used
from many units of my system. The unit C is a libry function.
I need to develop a function in unit C that could fulfill my array varriable, something like this:
Function FulfillVariableCadPal(MyVar: xxxxxxxx)
i : Integer
For i := 0 to 5
MyVar[i].id := xxxx
MyVar[i].word := xxxx
MyVar[i].sentence := xxxx
and so on
My problem is that I don't know how to, I tried to create (MyVar: Array of TCadPal;) but the compiler told me
ULibSQL.pas(6481): E2008 Incompatible types
This error points to this line SetLength(Myvar, Length(MyVar)+1);
I thanks in advance the help