When I pass an array to ARRAY INSERT with a type pointer the compiler (PBDLL6) doesn't recognise that is actually an array. The following short program demonstrates
The compiler gives error 423 array variable expected
If I remove the pointer and pass the array directly as in the next example
the compiler gives error 477 syntax error
If I make it even simpler
the compiler again gives error 423
I have large arrays of complex UDT's which contain large arrays of unions and was hoping I could insert and delete from them quickly without resorting to assemler instructions.
Any suggestions?
------------------
Code:
TYPE testa a(999) AS BYTE END TYPE GLOBAL ta() AS testa GLOBAL tp AS testa PTR SUB testinsert () REDIM ta(999) tp = VARPTR(ta(2)) ARRAY INSERT @tp.a(100) FOR 100 ,0 END SUB
If I remove the pointer and pass the array directly as in the next example
Code:
TYPE testa a(999) AS BYTE END TYPE GLOBAL ta() AS testa SUB testinsert () REDIM ta(999) ARRAY INSERT ta(2).a(100) FOR 100 ,0 END SUB
If I make it even simpler
Code:
TYPE testa a(999) AS BYTE END TYPE GLOBAL ta AS testa SUB testinsert () ARRAY INSERT ta.a(100) FOR 100 ,0 END SUB
I have large arrays of complex UDT's which contain large arrays of unions and was hoping I could insert and delete from them quickly without resorting to assemler instructions.
Any suggestions?
------------------
Comment