Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-10

Getting the size of an array

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andy Sy

In Delphi (the later versions I suppose), it is
possible to get the size of an array, and not just the size of a String, using Length()

Is this not available yet in FreePascal or is there another way of doing it?

You can use SizeOf, but then you'd have to get the SizeOf the type of the array first (is this possible?) and divide the SizeOf the array type by it.

========================================= reply-to: a n d y @ n e t f x p h . c o m http://www.neotitans.com Web and Software Development
Peter Vreman
to Andy Sy
Show quoted text 10 lines
In Delphi (the later versions I suppose), it is possible to get the size of an array, and not just the size of a String, using Length() Is this not available yet in FreePascal or is there another way of doing it? You can use SizeOf, but then you'd have to get the SizeOf the type of the array first (is this possible?) and divide the SizeOf the array type by it.

It is already supported in the development (1.1) compiler