The Gunga Din reference made me wonder where the phrase 'dot and carry' comes from. I know someone who uses it to signify someone or something that is lame or limping, i.e. they are going 'dot and carry'.
In the 1700s, 'dot and carry' was a schoolboy phrase used to describe an arithmetical process as in 'dot and carry one'. In adding, for example, the 'dot' part presumably meant one process had been completed...ie column one added up to 12, say, so 2 was written down... and the 'carry one' meant that the 10 (in the form of '1') had to be carried over to column 2.
The phrase 'dot and carry one' was even a nickname applied to maths teachers back then!
Sorry, I should have added above that, at the same historical period, the phrase was also applied to anyone with a wooden leg...the 'dot' referring to the stumping noise made by the peg and the 'carry one' referring to the other leg being 'carried through', as it were, as the person moved.
As I recall, I was taught to put down a dot for each 10 I was carrying over - so if the first column added up to 32 I would write down 2 and put three small dots in the next column to remind me to add on 3 more to it. But I don't know if this was connected to the Long John Silver sort of dotting and carrying at all.
J, the original version of the peg-leg situation was "dot-and-go-one". It would seem that using "dot and carry" for limping was a later borrowing from the mathematical one we have both explained.
Oh! I should also have added that the significance of the 'dot' element did not only have to do with the sound of tapping a peg-leg made on hard ground but also to the mark it made on soft ground...ie a circular dot-shape.