PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD21 - ArrayDeleteLine
WD21 - ArrayDeleteLine
Iniciado por guest, 30,ago. 2016 23:22 - 1 respuesta
Publicado el 30,agosto 2016 - 23:22
Hi All

I need to read through a structured array and conditionally delete lines. The docs state that after each deletion using ArrayDeleteLine the size of the array changes and therefore the subscript changes. Does anyone have any code snippet that can illustrate the best way to do this without ending up out of range and without missing any array entries? Would greatly appreciate it if you could share your solution.

Cheers
André
Publicado el 30,agosto 2016 - 23:39
What an idiot - I did a search on this very group a while back and was answered by Peter. The trick is to step backwards through the array and use ArrayDelete - BTW ArrayDeleteLine is not supported in Android.

Lesson learnt - do a search before asking a question :-)

Cheers
André