Doubt in understanding the advantages of Fixed Exchange Rate The author of my book writes:

ADVANTAGES OF EXCHANGE RATE
If exchange rates are fixed, then inflation may have a very harmful effect on the demand for exports and imports. Because of this, the government is forced to take measures to ensure that inflation is as low as possible, in order to keep businesses competitive on foreign markets. Thus, fixed exchange rate ensure sensible government policies on inflation.

I don't understand this point and would be grateful if someone could explain it, perhaps with a real world example.
Basically, if you are the government, its a way that you are telling everybody that they should believe your commitment to low inflation. They should believe you, because you'll hurt yourself a lot if you allow inflation.

More generally, economists sometimes talk about agent's ability to commit to a policy: say, governments might promise something, but its hard for investors to believe that they'll follow through. SO one way to solve this problem is that the government builds creates an institution, where breaking the promises hurts a lot.

The classical reference is Odysseus getting his crew to tie him to a mast so he would not throw himself at the sirens in the sea.  He is in effect choosing to bind his future self, curtailing his own freedom. The value of this is that it gives him freedom to do other things (travel along the siren infested waters and listen to their song). 

A fixed exchange rate can serve such a purpose: The idea is that a country fixes the exchange rate. This fixed rate makes it very obvious and very costly to behave badly, say by printing money or increasing government borrowing. The fixed rate constrains the government from bad behaviour. 

Of course, this decision is not free. In the case that you set a fixed rate and then you end up behaving badly, then the result is worse than if you had never fixed the exchange rate in the first place. (Imagine Odysseus drowning if he is tied and the boat sinks and he is unable to swim away.)