Image copyright EPA

In the decades I spent living in England or abroad, I was often struck by the unconscious way my English friends fused what seemed to me to be two quite distinct identities - English and British.

They used the terms as though they were interchangeable; as though they meant the same thing.

It has never been possible to do that as a Scot: manifestly, Scotland and Britain cannot be mistaken for each other.

When I came back to live in Scotland full-time after almost 30 years away, I was stuck by how profoundly the country had changed.

When I was a child in the 70s and a young adult in the 80s, the political space, the public arena, the demos within which we lived, argued, disputed and thought was overwhelmingly British.

But since the 1980s, and with the creation of a Scottish Parliament in 1999, a distinct Scottish demos - a distinctly Scottish political space - has developed alongside the enduring British one.

That reflects the dual national identity that most people in Scotland [according to this survey] still feel: British and Scottish.

But it reflects another fundamental change that has taken place since I left Scotland in the mid-80s.

When I was growing up, the British state counted for a lot in Scotland.

Image copyright Hulton Deutsch Image caption The Queen visits the Rothes Colliery in Fife in 1958

It dug coal, milled steel, built ships; it put the phone in your hall, brought you electricity that lit your home and the gas you cooked with.

The house you lived in was probably publicly owned.

If you were a miner in Fife, you were part of a community of shared interest and identity with miners in Yorkshire and Nottinghamshire and South Wales.

The same was true if you worked in steel or ship-building.

The great nationalised industries of post-war Britain were part of a commonly-held pan-British enterprise - socio-economic bedrocks of a shared Britishness.

But much of that inheritance was swept away in the 1980s and 90s and with every year that passes the memory of it recedes into the middle distance of collective memory.

You might like to read - Scotland's Decision, by Allan Little which was published on 4 September, 2014 - 14 days before the Scottish independence referendum.

When I came back to Scotland to report on the independence referendum campaign, I found to my surprise that many of my old friends (though by no means all) had decided to vote Yes to independence, though often they insisted that this did not make them "Nationalists" with a capital N.

When I asked them why, they offered many reasons and, almost always, high on this list was what they perceived to have happened to politics in England: their sense of shared enterprise, of being part of a community of interest and values shared with the rest of the UK, had been eroded.

I came to believe that what had happened in Scotland in the 30 years I'd been away was not so much a rise of Scottish national identity, but a falling away of much of what it had meant to be British, as well as Scottish.

I think the survey results chime with that impression.

Scottish identity holds up very well.

In all age groups, from 18 to the over 65s, between 80% and 85% feel strongly Scottish.

Image copyright Getty Images Image caption Scottish identity was strong across the board and there's little difference between those who voted Leave and those who voted Remain in the EU referendum

It is also consistent across socio-economic classes; and there's little difference between those who voted Leave and those who voted Remain in the EU referendum.

It is in Scotland, though, that British identity is least robust: 59% still feel strongly British but this is not consistent across the age groups.

Among the over-65s it is 73%.

And it falls to just over half for those aged 49 and under.

British identity is least strong in the Central belt: 51% said they felt strongly British in Central Scotland; 52% in both the Lothians and Glasgow.

Contrast that with Wales, which went through a similar socio-economic shock with the loss of its heavy industry.

Are we more or less optimistic?

There, only 62% said they felt strongly Welsh, compared with 79% who said they felt strongly British.

But what distinguishes Scotland and Wales most noticeably from their neighbours in England is this: that in England there is a strong nostalgic sense of something lost, a belief that the country is not as good as it used to be.

That is the prevailing view in England; not so in Scotland or Wales, where significantly more people said they believed their country's best days lie ahead of it, rather than behind it.

Why?

Are people in Scotland and Wales more optimistic than people in England about the future?

Or are there fewer reasons, in Scotland and Wales, to want to go back to the way things once were?

The survey doesn't put that question; it leaves us to draw our own conclusion.

The survey was conducted for the BBC by YouGov. The sample size in Scotland was 1,025 adults. The fieldwork took place between 25 and 30 April 2018. Read the results here.