This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Head and Tail Pointers. You definition ???

No, this has nothing to do with '51s, but I want the opinions of some of you tenured chaps:

In a circular queue, what do you consider the head and what do you consider the tail?

I've always know the tail as the point (index, whatever) that points to the next available free space in the buffer. That is, data is placed IN at the tail, and removed from the head position. I learned this definition years ago when digging into the IBM PC's keyboard buffer and a book on the topic listed the pointers as I describe above. That's how I've thought of them ever since and is how several google results describes them as well.

You?

Parents
  • I strongly disagree.

    I agree with what you said in that sense...yes, we all wonder WTF we did in our old code from time to time.

    What I was referring to was specifically the "head & tail" terms: I've never had any problem with understanding those in [b]my[/b] code because I've been consistent from day one with them.

    Dealing with "diaper code" where there's 3 or 4 different authors mangling different styles together (which describes the current mess I'm saddled with) is a different story.

Reply
  • I strongly disagree.

    I agree with what you said in that sense...yes, we all wonder WTF we did in our old code from time to time.

    What I was referring to was specifically the "head & tail" terms: I've never had any problem with understanding those in [b]my[/b] code because I've been consistent from day one with them.

    Dealing with "diaper code" where there's 3 or 4 different authors mangling different styles together (which describes the current mess I'm saddled with) is a different story.

Children