[fpc-other] [fpc-pascal] FPC Graphics options?

Nikolay Nikolov nickysn at gmail.com
Wed May 24 15:36:16 CEST 2017



On 05/24/2017 04:28 PM, Karoly Balogh (Charlie/SGR) wrote:
>
> 1., no standard way to determine the length of an array compile time.
> sizeof() returns the length in bytes, not the number of elements.
> Basically you have to do sizeof(array)/sizeof(elementtype), where the
> elementtype has to be the same as when you declare an array.
It's even worse than that - see my other mail. Even the size in bytes is 
lost, as soon as you try to pass that array as a parameter to function, 
since it gets implicitly converted to a pointer, and the size is lost, 
because... who cares about array sizes, this is C! :)

Nikolay


More information about the fpc-other mailing list