Code: Pascal [Select][+][-]fillchar(BS[0],sizeof(BS),1);
but then I am wondering why you aren’t simply using a for loop and a plain := assignment.
btw.: Are elements of a dynamic array initialized with zeros or not? Hard to find an answer in the docs.
Quote from: winni on October 11, 2021, 05:56:38 pmbtw.: Are elements of a dynamic array initialized with zeros or not? Hard to find an answer in the docs.AFAIK all such compiler-managed types are initialised with zeros.
A few notes:...bitpacked (what you probably wanted) is not allowed for dynamic arrays...In essence the data of your TBigSet will always be a multiple of a Byte. For really accessing bits in the array you need to do this manually using bit operators.
So you have to fool the compiler:
I wouldn't say that this is fooling the compiler as you're simply using language features the way they're supposed to be used...