I have an array
1
1
2
2
3 <------------------ I wish erase this
3 <------------------I wish erase this
4
4
5
5
and I wish erase only the lines having the number 3
I not understood why the procedure erase only one line having the number 3
the test
1
1
2
2
3 <------------------ I wish erase this
3 <------------------I wish erase this
4
4
5
5
and I wish erase only the lines having the number 3
I not understood why the procedure erase only one line having the number 3
the test
#include "Fivewin.ch"
Function test()
local aItemsRows:={}
local n,d
local nNumber:=3
// create an array
For n= 1 to 5
aadd(aItemsRows, {n} )
aadd(aItemsRows, {n} )
next n
xbrowser aItemsRows
//now I wish erase only some records all numbers 3
For d =1 to Len(aItemsRows)
IF aItemsRows[d][1]=nNumber
adel( aItemsRows,d,.f.)
// asize( aItemsRows, len( aItemsRows))
ENDIF
next d
xbrowser aItemsRows
return nilSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com