Yes that was it exactly, I just bobbed up and down, trying to get my feet on the bottom of the pool (I was so close to where I could have stood - I had gone out further that I normally would have on an inflatable dolphin and had somehow come off it, letting go on the inflatable in the process), every time I went under, I breathed in more water/swallowed because I was trying to get some air at the same time and couldn't process the two things quickly enough before it started again, causing me to cough.
I was starting to think that I would have to start swimming underwater to get back to safety, except that I didn't have enough breath by this point, and besides, I was coughing too much.
What I remember most about it was the noise of the packed pool, it suddenly being muffled, then loud, then muffled, then loud, and so on.
I was near to where a lifeguard was, so I don't know if he got someone to help or if the guy who saved me saw it himself and knew what it was, I was about 6 and never thought to ask as I didn't really know what had just happened, although I was grateful as I had got a bit of a fright. I wonder who he was and where he is now.
That said, it never put me off swimming again, I had learned my lesson.