[fpc-pascal] Access Violation When SetLength(DynArray, Value)
james.richters at productionautomation.net
Sat Sep 10 01:41:36 CEST 2022
>With FPC 3.2.0 and newer you can do "Concat(MyArray, [TheNewElement])" or (if modeswitch ArrayOperators is active) "MyArray := MyArray + [TheNewElement]".
I have a lot of arrays of records, but I just build the record into the array elements, like this:
Could either of the methods mentioned work directly with something like this or would I have to build the record first and do:
MathArray:= MathArray+ MyRecord;
I thought I would make my own IncArray() function:
Procedure IncArray(Var TheArray);
But I get a 'Type Mismatch' Any ideas how this could be done? Is this even possible without specifying the exact type of array?
More information about the fpc-pascal