Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: itemInsert() list problem null entry
k= "1" k= iteminsert( "2",-1, k, @tab ) k= iteminsert( "3",-1, k, @tab ) results in k=1@TAB2@TAB3 which is correct but k= "" k= iteminsert( "",-1, k, @tab ) k= iteminsert( "3",-1, k, @tab ) f=itemcount( k, @tab ) results in k=3 and f= 1 which is not in my opinion This should result in k=@tab3 and f= 2 k= "" k= iteminsert( "2",-1, k, @tab ) k= iteminsert( "",-1, k, @tab ) f=itemcount( k, @tab ) results in k=2@tab and f= 2 which is correct again changing -1 in 0 in the 2nd line makes no differenceso it's never possible to append an item with this function when the 1st item is empty even though it is possible when the 1st item is not empty so the behavior of this functions is not consequent in this respect I think!
To avoid this problem I often initialize an empty list with an anchor item (which can be the delimiter in fact) to have at least one item in list, so appending would be ok and ItemCount can count successfully.
Article ID: W15155
File Created: 2002:09:05:13:50:08
Last Updated: 2002:09:05:13:50:08