[fpc-pascal] Subscript pointers

Michael Van Canneyt michael at freepascal.org
Thu Jun 22 16:51:06 CEST 2023

On Thu, 22 Jun 2023, Hairy Pixels via fpc-pascal wrote:

>> On Jun 22, 2023, at 8:41 PM, Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>> It's for easier pointer math, a construct which has been used in FPC since day 1 (AFAIK).
>> Use with care, since no boundary checks are done.
> You mean instead of doing p + 1 or you can do p[1]?


> It may have been used for C compatibility too since an array in C is just a pointer.

Yes, the concepts are similar.


More information about the fpc-pascal mailing list