LIST.Remove

Previous  Next

 

new-size = LIST.Remove( lid AS HANDLE,

                        lex AS INTEGER ) AS INTEGER

 


 

Removes the List Element at the specified Index (lex).  Any allocated memory is freed and any REFERENCE variables are being unreferenced.

 

Example:

 

DIM hList AS HANDLE

 

hList = LIST.Create( "Kalle", STRING, "Nisse", REAL, 4 )

 

LIST.At( hList, 0, 0, "Kalle Anka      " )

LIST.At( hList, 0, 1, 1.234 )

LIST.At( hList, 1, 0, "Kajsa Anka      " )

LIST.At( hList, 1, 1, 2.345 )

LIST.At( hList, 2, 0, "Joakim von Anka " )

LIST.At( hList, 2, 1, 3.456 )

LIST.At( hList, 3, 0, "Farmor Anka     " )

LIST.At( hList, 3, 1, 4.567 )

 

' Remove each Element

 

LIST.Remove( hList, LS_BACK )

LIST.Remove( hList, 1 )

LIST.Remove( hList, LS_FRONT )

LIST.Remove( hList, LS_FRONT )