<div dir="ltr"><div><div><div><span style="font-family:courier new,monospace">Hi,<br><br>In the following program: <br><br>program worksheet;<br>{$mode objfpc}{$H+}<br>type<br> TWorksheet = packed object<br> private<br> FProp: string[5];<br>
//FProp: Integer;<br> public<br> property Prop: ShortString read FProp;<br> //property Prop: Integer read FProp;<br> end;<br>begin<br>end.<br></span><br></div><span style="font-family:courier new,monospace">I got an error while compile:<br>
<br>worksheet.lpr(9,42) Error: Incompatible types: got "TWorksheet.ShortString" expected "ShortString"<br><br></span></div><span style="font-family:courier new,monospace">I wonder who defined "TWorksheet.ShortString"? Why string[5] is not compatible with ShortString?<br>
<br></span></div><span style="font-family:courier new,monospace">Thanks!<br></span><div><div><br></div></div></div>