مَا ضَرَبَ زَيْدٌ إِلَّا عَمْرًا
Zayd struck no one except ʿAmr.
مَا ضَرَبَ عَمْرًا إِلَّا زَيْدٌ
No one except Zayd struck ʿAmr.
The first statement confines the action to an object; the second confines that particular striking to an agent.
Both use negation and illā, yet the element singled out differs. The grammatical function of the term after illā is therefore essential to determining the direction of qasr.