Content deleted Content added
No edit summary Tags: Mobile edit Mobile app edit iOS app edit |
Since the buffer read pointer is pointing to 3, and 3 and 4 are overwritten by A and B, A and B would be the values returned after two reads. |
||
Line 34:
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 returned is '''not''' 3 & 4 but
:[[Image:Circular buffer - X789ABX.svg|250px]]
|