Media playback is unsupported on your device Media caption What can Scotland learn from Quebec?

Quebec has voted twice against independence, but the question has never been settled or gone away.

On a recent summer's evening, along streets lined with onlookers waving the blue and white fleur-de-lis flag rather than the Canadian maple leaf, a parade was staged in Quebec City retelling the story of the settlement of New France.

Passing under the ramparts of the fortified old city were mock-ups of the sailing ships that arrived here in the early 17th Century to found a French colonial outpost.

Carrying muskets and swords, men marched dressed as combatants from the Seven Years' War between France and Britain, remembered here as the War of Conquest.

Women wearing period costumes, resembling extras from Les Miserables, sang Frere Jacques, and other French songs.

The festival celebrated Quebec's unique heritage - but doubtless many Quebecers would have gone home that night lamenting how, for all the French-speaking province's distinctive traditions, mannerisms and laws, it has never achieved outright independence.

Image copyright Getty Images Image caption 'No' campaigners celebrate the result of the 1995 referendum...

Quebec has remained distinctively Gallic, from the bustling street cafes, with menus offering "poulet frit" and slower-than-American service, to chateau-style architecture, which is one of the reasons why Hollywood regularly uses it as a pretend France.

However, although the province has the feel of a nation within a nation, voters here have twice decided against independence. In English-speaking North America, it thus remains an anomaly but not a country.

The first referendum in 1980 produced a lopsided result, with 59% voting to remain part of Canada and 40% voting to follow a secessionist path.

A second referendum in 1995 produced a photo-finish, 50%-49%, but the federalists still edged out the "sovereigntists", as they are called here. The closeness of the result intensified the anguish of their defeat.

Image copyright Getty Images Image caption ... but there are tears in the 'Yes' camp

Stephane Parent, who helped organise the festival in Quebec City, exemplifies the separatists' longstanding dilemma.

Though he considers himself a Quebecer first and a Canadian second, his Quebecois pride has not made him a fully-fledged separatist. He fears the economic uncertainty that might arise from independence.

"Are we still going to be with the Canadian dollar?" he asks. "Are we still going to trade with our neighbour Ontario? Is it going to be that easy to trade with the other Canadian provinces? How would the Americans consider us if we decided to split? Those were big concerns for a big part of the population."

This widespread concern has hobbled the separatist cause. The province nowadays accounts for almost a fifth of the Canadian economy - an independent Quebec would be the world's 44th biggest economy, not far behind Norway.

But though Quebec would hardly be a poor country, it might well be poorer than it is now. Because of its ageing population and higher-than-average unemployment, it is a beneficiary of transfer payments from the Canadian federal government. It has a relatively small tax base.

Separatists claim that the mood of financial alarmism ahead of the previous two referendums arose out of the scare tactics from Canadian nationalists and their backers in the business community.

Exaggerated or not, doubts about the future currency, the possible withdrawal of investment and complications over trade spread enough nervousness to persuade some small "s" sovereigntists voters to stick with the status quo.

The lesson here is that perceptions of economic rationalism can easily trump feelings of nationalistic romanticism. For many in Quebec, the head ultimately ruled the heart.

Image copyright ALAMY

But the independence struggle has managed to accrue for the province a great deal more autonomy. Some might even argue Quebec has achieved de facto independence, given the provincial government's control over so many of its education, immigration, taxation and cultural policies.

First passed in 1977, the Charter of the French Language, better known as Bill 101, made French the official language of Quebec, and made mandatory its use in business and commerce. Quebec now has immigration policies favouring new arrivals from Francophone countries, such as Algeria and Morocco, to help preserve its identity.

Even though sovereigntists have lost two referendums, then, they have gained more power. Yet, at the same time, devolution appears to have dampened the separatist spirit. It has turned down the heat on many of the simmering grievances that fuelled the independence movement in the 1960s and 1970s.

Sociological and demographic trends are also working against the separatists. For younger Quebecers, independence, it seems, is not a front-tier issue. A recent poll suggested 69% of 18-to-24-year-olds would vote "No".

More outward-looking as a generation than their parents and grandparents, many young Quebecers look upon themselves as global citizens, as well as Canadians and Quebecers. Their primary concerns are more everyday - getting decent jobs and buying their own homes.

Quebec's class politics, which were always linked inextricably to its separatist politics, has also changed. An Anglophile business elite no longer dominates Montreal, Quebec's financial hub, as it did throughout Canadian history, and blue-collar Quebecers, who were often managed by English-speaking bosses, no longer feel like second-class citizens, as they did in the past.

Image copyright ALAMY Image caption The fleur-de-lys takes its white cross from the ancient royal flags of France

Though Canada's political centre of gravity has shifted westward in recent times - the country's conservative Prime Minister Stephen Harper, though Toronto-born, represents a constituency in resource-rich Alberta - this trend has not sparked a separatist revival. Paradoxically, the two referendums were held when two pro-Canada Quebecers, Pierre Trudeau and Jean Chretien, were prime minister.

A key difference between Scotland and Quebec is the simplicity of the six-word question posed in the referendum: "Should Scotland be an independent country?" In 1995, Quebecers faced a 43-word question that many voters found incomprehensible. In 1980, it ran to a riddle-like 106.

Yet however simply the question is worded, it inevitability unleashes complex and sometimes contradictory feelings about national identity, cultural heritage and economic security.

Despite two referendums, and despite the fact that it is almost 20 years since the last poll was held, the question of independence has never been settled or gone away. In Canada they even have a phrase to describe this protracted constitutional struggle - the "neverendum referendum".

How might Scotland's decision affect the rest of the UK?

This might provide a lesson for Scottish nationalists, that the battle for independence is a multi-phase affair. On the night of the 1980 referendum, the leader of the Parti Quebecois, Rene Levesque, tearfully told his supporters: "A la prochaine" - "till the next time".

In Quebec now, however, there is no great enthusiasm for a third referendum. The Parti Quebecois lost a snap election in April, partly because it raised the spectre of another poll.

Many now seem reconciled to the status quo - a kind of independence-lite, where Quebec's culture and heritage is respected and protected, but not the kind of full independence that might endanger its economic future.

Watching the parade that night in Quebec City, clearly there were many Quebecers who believe that the multi-chaptered history of their province has not yet reached its denouement, and that only full independence can deliver it.

But in Quebec these days it is also possible to detect a growing feeling that the "independence moment" might have gone, and that separatism might be more a part of its history than its future.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.