03-01-2013 12:36 PM
Whats left in the list after this function call?
03-04-2013 10:19 AM
Hi zr1rob,
According to the CVI help, ListRemoveItems's prototype is:
void ListRemoveItems (ListType list, void *itemsDestination, ssize_t firstItemToRemove, ssize_t numberOfItemsToRemove);
The function removes a specified number of consecutive items from a list. If itemsDestination is not zero (0) then the contents of the items will be copied to itemsDestination after the items are removed.
Ioan **bleep**arasan || National Instruments
03-04-2013 10:54 AM
thanks for the reply, but thats just repeating what the 'help' says. It doesnt answer as to whats left in the list after the data is removed.
Does the act of removing the existing data clear (turn to 0) the list or is there some default value left in the list?
03-05-2013 02:03 AM
I tend to answer 'No' since ListRemoveItems simply rolls data back with a memmove but does not deallocate internal memory nor it clears/initializes it: that memory area maintains previous content. The source code for toolbox instrument is distributed with CVI so you can check it by yourself. The instrument guarantees that you are not permitted to read past the active number of items from the list, but memory is neither cleared nor effectively released until the list is in effect.