735 ILCS 5/2-613 (West 1992). Plaintiff maintains that it was reversible error for the trial court to dismiss this case based on an affirmative defense which the defendant failed to plead and cites Handleman v. London Time, Ltd. (1984), 124 Ill. App.3d 318, 464 N.E.2d 710, in support of her position. In Handleman, the plaintiffs failed to allege or prove any agency relationship to the beneficial owners of the subject premises.
Neither do we believe that the language of section 2-613(d) was intended to impose such a requirement in circumstances like those in this case. When read in its entirety, that section, as well as others in the Code relating to pleadings, makes clear that the prime function of pleadings is to apprise the opposition of the nature of the claim or defense a party intends to raise at trial ( Handelman v. London Time, Ltd. (1984), 124 Ill. App.3d 318, 464 N.E.2d 710; see also Ill. Rev. Stat. 1981, ch. 110, par. 2-612(b)) "which, if not expressly stated in the pleading, would be likely to take the opposite party by surprise * * *" (Ill. Rev. Stat. 1981, ch. 110, par. 2-613(d)).