Cole, J.,
dissenting.
In this case Brown filed a motion “to suppress all evidence as stated above because the government agents violated defendant’s Fourth Amendment and Fourteenth Amendment Rights of the United States Constitution.” In an evidentiary hearing, the trial court heard testimony of both the Commonwealth and the defendant on the suppression motion.
An opinion letter written by the trial judge commenced with this statement: “The Court must decide whether or not the officers *46in this case by conducting a warrantless search of the defendant’s baggage and person exceeded the permissible limits of 18.2-93 [sic], Code of Virginia.” As the previously quoted language from the defendant’s suppression motion clearly discloses, the basis for the motion was an alleged violation of the defendant’s constitutional rights, not the Code of Virginia. The trial court’s order in this case, however, was based on Code § 19.2-83, which limits the authority of a police officer to stop, question and search a suspicious person. As set forth in Judge Baker’s concurring opinion, this section contains no provision for suppression of evidence. Although a statement contained in the trial court’s opinion letter described the defendant’s search as “statutorily and constitutionally flawed,” the opinion concluded only that the motion was sustained “because the facts of this case do not justify an 18.2-93 [sic] stop or ‘intervention.’ ” In circumstances such as this, where the appellate jurisdiction of this court is dependent upon the basis on which a ruling is made, in order to discern such basis I believe it is appropriate to consider not only the order of the trial court, but also the pleadings upon which such order is entered. The pleadings in this case clearly and unequivocally sought suppression on constitutional grounds. The trial court’s order, however, while somewhat ambiguous, appears to respond to a different issue, an issue not before the trial court. When the order is viewed in the context of the pleadings and when the authority of the trial court is evaluated with reference to the function of the pleadings, I would find that the suppression order was, in law if not in fact, based on constitutional grounds.
The function of a pleading is to inform the opposing party of the nature of the case to be made against it. That purpose would be defeated if it were permissible to allege one case and prove another. If this were not the rule, the pleadings would be a snare to entrap the parties rather than a shield to protect them from surprise. City of Norfolk v. Vaden, 237 Va. 40, 44, 375 S.E.2d 730, 733 (1989).
Whether intentional or not, the consequence of the trial court’s ruling was to deprive the Commonwealth of its right of appeal under Code § 19.2-398. Because the trial court’s opinion letter was non-responsive to the motion before it and exceeded the relief requested, it was void and cannot serve as the basis for the suppression of this evidence. We must assume, therefore, that the *47suppression order was based, at least in part, on an alleged violation of the defendant’s constitutional rights since the order provided for suppression of evidence. When so viewed, the Commonwealth’s right of appeal is authorized. For this reason I would address the merits of the suppression ruling.