[Lazarus] Helper for arrays
DougC
doug at moosemail.net
Sun Oct 2 14:46:07 CEST 2016
I don't know the answer about helper function but I also dislike Length() for arrays.
I solve this dislike by using
for i := Low(IntegerArray) to High(IntegerArray) do
which covers more possibilities because it handles lower index limit that is non-zero.
Low() and High() also work with static arrays so you can use it almost everywhere.
Doug C.
---- On Sun, 02 Oct 2016 08:39:51 -0400Aradeonas via Lazarus <lazarus at lists.lazarus-ide.org> wrote ----
Hi,
Can I have or make helper for arrays? like making Count property so I can use it instead of Length ?
For example :
IntegerArray : array of integer;
....
for i:= to IntegerArray.Count -1 do
....
Regards,
Ara
-- http://www.fastmail.com - The professional email service
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20161002/812fa054/attachment.html>
More information about the Lazarus
mailing list