In time of war, an officer of an armed force who is serving with troops operating against an enemy and who exercises, under assignment in orders issued by competent authority, a command above that pertaining to his grade, is entitled to the pay and allowances (not above that of pay grade O–7) appropriate to the command so exercised.