Re: [fpc-pascal] Indexing into records using [] property

2018-10-18 Thread Ben Grasset
If the absence of dereferencing is the most important thing to you, you could do something like this: program Example; {$mode ObjFPC}{$H+} {$modeswitch AdvancedRecords} type TVec2 = record X, Y: Integer; end; TVec2Array = array of TVec2; TVecArray = record strict private Valu

[fpc-pascal] Indexing into records using [] property

2018-10-10 Thread Ryan Joseph
I’d like to know if there is a solution to the problem of indexing into records using [] properties. In the example below I have an array of records (a dynamic array for the example) and I’d like to use the [] property to index into the values. The problem is because the array holds records I n