Circular buffer: Difference between revisions

Content deleted Content added
improved inaccurate comments
Line 33:
Alternatively, the routines that manage the buffer could prevent overwriting the data and return an error or raise an [[exception handling|exception]]. Whether or not data is overwritten is up to the semantics of the buffer routines or the application using the circular buffer.
 
Finally, if two elements are now removed then what would be returnedremoved is '''not''' 3 & 4 (or rather now A & B) but 5 & 6 because 5 & 6 are now the oldest elements, yielding the buffer with:
 
:[[Image:Circular buffer - X789ABX.svg|250px]]