Reputation: 364
Im trying to migrate an old project from Delphi 5 to Delphi XE. When i try to compile the project now i get this error:
[DCC Error] *.pas(352): E2003 Undeclared identifier: 'VarToStr'
about this line:
PropValue := VarToStr(GetPropValue(Component, PropInfo^.Name));
It works fine in Delphi 5, and as far as i have found out VarToStr is also supported in XE ??
Upvotes: 1
Views: 4534
Reputation: 613592
I don't think you need to call VarToStr, you can just assign to the string as so:
PropValue := GetPropValue(Component, PropInfo^.Name);
Upvotes: 5