[fpc-pascal] String type compatibility
Xiangrong Fang
xrfang at gmail.com
Wed Apr 3 10:11:23 CEST 2013
Hi,
In the following program:
program worksheet;
{$mode objfpc}{$H+}
type
TWorksheet = packed object
private
FProp: string[5];
//FProp: Integer;
public
property Prop: ShortString read FProp;
//property Prop: Integer read FProp;
end;
begin
end.
I got an error while compile:
worksheet.lpr(9,42) Error: Incompatible types: got "TWorksheet.ShortString"
expected "ShortString"
I wonder who defined "TWorksheet.ShortString"? Why string[5] is not
compatible with ShortString?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130403/7e2294aa/attachment.html>
More information about the fpc-pascal
mailing list