Splunk wrote: Wed Mar 01, 2023 6:34 pm
@Kiffi: I am still of the opinion that it is a bug. Because I can't read anywhere in the description that it doesn't work.Did you address the issue, or did you immediately read what "jacdelad" wrote and mistakenly assume I made a mistake?
Thanks to all
No, it is not a bug.
Your first error was the missing closing bracket.
Your second error was using OffsetOf wrongly. There is no documentation about the possibility to use the square brackets operator to calculate offsets of static arrays within structure members. But I understand that this would be a nice feature.
The only bug I could imagine is the result of TypeOf(Anything\Table) which is #PB_Long = 5, although in fact it is a static array. But on the other hand it is an static array of type #PB_Long.

However SizeOf(Anything\Table) returns 20 which is 5 times the size of a Long which is not consistent with TypeOf() then.
I was trying to do something like this as an workaround but because of that inconsistency it does not work:
Code: Select all
Structure Anything
Table.l[5]
EndStructure
NewList void.Anything()
SortStructuredList(void(),
#PB_Sort_Ascending,
OffsetOf(Anything\Table) + 3 * SizeOf(Anything\Table),
TypeOf(Anything\Table))
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.