2014년 12월 31일 수요일

Clearing the contents of a standard list

Hi, I'm simply trying to clear the index values in a list to restore the list to an empty state.  I'm using what I believe should be a pretty straightforward code block to accomplish this, but I am getting an error.  I will include images of the code block in question, as well as the error code below.  Please help.





Why not simply use create-empty-list block?



Because I don't want to accumulate a bunch of lists as the user continues to use the program.  This method seems like it would be bad for performance eventually, no?



That does seem to get the job done, I guess I'll go with that.  I just didn't want to wind up with a bunch of old lists 'in the background' by 'creating new lists, but I guess as long as I'm assigning a new list to the existing variable, there is only ever the one list in existence at any time?



as long as I'm assigning a new list to the existing variable, there is only ever the one list in existence at any time?
exactly


댓글 없음:

댓글 쓰기