Further problems with arrays...
Further problems with arrays...
I have function:
function ArrayToDelimitedString(const aArray: array of const; const aSeparator: Char): string;
I want to pass to this function parameter of type TArray:
UA : TArray;
s := ArrayToDelimitedString(UA, ',');
...and I get error:
[dcc32 Error] E2010 Incompatible types: 'array of TVarRec' and 'System.TArray'
How to solve this problem?
http://System.Ca
I have function:
function ArrayToDelimitedString(const aArray: array of const; const aSeparator: Char): string;
I want to pass to this function parameter of type TArray
UA : TArray
s := ArrayToDelimitedString(UA, ',');
...and I get error:
[dcc32 Error] E2010 Incompatible types: 'array of TVarRec' and 'System.TArray
How to solve this problem?
http://System.Ca
"array of const" Is a compiler-magic "special" type that's actually an array of TVarRec. Array of Cardinal is an incompatible array type. You'll have to resolve this with a different method signature or, if you're really feeling brave, a function that iterates over your array of cardinals and converts it into an array of TVarRec.
ReplyDelete