Setarray calls this function
For me same arraystructure means :
LEN(adata) == LEN(aNew)
AND
Each column from olddata must have the same valtype from new data
Must line :
if nLen <= Len( aNew ) <=== !!!!!!!!!!
not be changed in
if nLen = Len( aNew[1] ) <=== !!!!!!!!!!
Frank
- Code: Select all Expand view
function SameArrayStruct( oBrw, aNew )
local lSame := .t.
local n, nLen, aData
aData := oBrw:aArrayData // old Data
if ValType( aData ) == ValType( aNew )
if ValType( aData ) == 'A'
if Len( aData ) > 0 .and. Len( aNew ) > 0
if ValType( aData[ 1 ] ) == 'A' .and. ValType( aNew[ 1 ] ) == 'A'
nLen := Len( aData[ 1 ] )
if nLen <= Len( aNew ) <=== !!!!!!!!!!
lSame := ( AScan( aData[ 1 ], { |u,i| ValType( u ) != ;
ValType( aNew[ 1 ][ i ] ) }, 1, nLen ) == 0 )
else
lSame := .f.
endif
endif
else
lSame := .f.
endif
endif
else
lsame := .f.
endif