[Lazarus] record literal in FPC?
Andreas Schneider
aksdb at gmx.de
Wed Jan 9 09:47:46 CET 2013
Hi,
you could also use the with-statement, that is pretty handy in such cases:
|with Edit1.CaretPos do
begin
X := 0;
Y := 0;
end;|
Best Regards,
Andreas
On 08.01.2013 16:30, xrfang wrote:
> Hi,
>
> Is there "record literal in FPC? e.g. normally, you do:
>
> var
> 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?
>
> Thanks,
> Shannon
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130109/e7b4dec4/attachment-0003.html>
More information about the Lazarus
mailing list