[Lazarus] record literal in FPC?
xrfang at gmail.com
Wed Jan 9 13:19:33 CET 2013
I just tried, your method did not work as expected. It compiled ok, but didn't put the cursor at the end of the line as I wanted. However, assign CaretPos a new TPoint worked.
在 三, 1月 9, 2013 at 4:47 下午，Andreas Schneider <aksdb at gmx.de> 写道：
you could also use the with-statement, that is pretty handy in such cases:
with Edit1.CaretPos do
X := 0;
Y := 0;
On 08.01.2013 16:30, xrfang wrote:
Is there "record literal in FPC? e.g. normally, you do:
cp : TPoint;
cp.X := 0;
cp.Y := 0;
Edit1.CaretPos := cp;
I would like to use literal directly, such as:
Edit1.CaretPos := (X: 0, Y: 0);
But the above syntax is wrong. Is there such thing exists?
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus