
125 Ill. App.3d 338 (1984)
465 N.E.2d 1009
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
LYONEL L. HARMAN, Defendant-Appellant.
No. 2-83-0769.
Illinois Appellate Court  Second District.
Opinion filed June 27, 1984.
*339 G. Joseph Weller and John R. Wimmer, both of State Appellate Defender's Office, of Elgin, for appellant.
Fred L. Foreman, State's Attorney, of Waukegan (Phyllis J. Perko and Cynthia N. Schneider, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Judgment affirmed.
JUSTICE NASH delivered the opinion of the court:
After trial by jury defendant, Lyonel L. Harman, was found guilty of burglary (Ill. Rev. Stat. 1981, ch. 38, par. 19-1(a)) and was sentenced to three years' imprisonment. He appeals, contending the trial court erred: (1) in excluding defendant's exculpatory statement made after his arrest; (2) in refusing to instruct the jury on the lesser offense of criminal trespass to land; and (3) in ruling that it did not have discretion to sentence defendant to probation under section 5-5-3(c)(2)(F) of the Unified Code of Corrections (Ill. Rev. Stat. 1981, ch. 38, par. 1005-5-3(c)(2)(F)).
Robert Pushee, superintendent of parks of the Zion Park District, testified that on June 2, 1983, no one had permission to enter the clubhouse of the Zion Golf Course or take anything out of it. He inspected the clubhouse after the police had arrived and saw that nothing had been taken, but that the back window had been broken. He *340 also described a fence which ran around the entire golf course and a sign which said "Do not climb fence" located further down from the gate which led to the clubhouse.
The arresting officers, Patrick Lowery and John Samuelian, testified they had responded to a burglary alarm at the clubhouse of the Zion Golf Course at 3 a.m. on June 2 and found defendant inside the building with a set of keys to the golf carts in his possession. They observed that a back window had been broken and a large piece of concrete was lying on the floor. Outside, they found a 55-gallon drum directly under the broken window. Defendant was placed under arrest and advised of his Miranda rights, and when the officers inquired what he was doing in the building, he responded that he had entered to make a telephone call.
On cross-examination Officer Lowery stated that he was present at another conversation with the defendant later at the police station in which the defendant gave a statement to Officer Dayton. At this point, the State objected on the grounds that the statement made would be self-serving hearsay and beyond the scope of the direct examination. The court sustained the objection, and suggested that if the defense wished to question Lowery regarding defendant's statement at the police station, it should call him as a defense witness.
Officer Samuelian testified that he had a conversation with defendant in the squad car on the way to the police station in which the defendant told him he intended to take the golf cart for a joy ride. When asked whether he had any further conversation with defendant on the way to the station, Samuelian replied that he had no further conversations with the defendant until after they had arrived at the station, where Officer Dayton took a statement from him. On cross-examination, defense counsel asked Samuelian about the defendant's statement to Officer Dayton. Samuelian testified he did not recall what defendant told Officer Dayton and only knew that defendant had talked to him, as he was in and out of the room in which Officer Dayton and defendant were conversing.
Defense counsel inquired further whether Samuelian saw defendant make a written statement during the times he was in the room with him and Samuelian responded he had not. Counsel then inquired whether the officer recalled if defendant had told him he was going to bring the cart back and the officer responded he did not remember defendant saying he was going to bring it back. Counsel then sought to refresh his recollection with earlier testimony by Officer Samuelian at a preliminary hearing and the officer responded that he did not recall testifying at that time. The State objected, and in a side bar discussion *341 the court was advised that Officer Samuelian had testified at the preliminary hearing that he was present along with Dayton and Lowery when the defendant gave a written statement at the police station, and that he then recalled that the substance of the statement defendant made was that he was going to take the golf cart, ride over the park, and then bring it back. The trial court sustained the State's objection to this line of inquiry, but directed that Samuelian stand by to be available for recall as a defense witness as he had earlier directed Officer Lowery. The State thereupon rested.
The State made a motion in limine to exclude as hearsay any testimony by Officer Dayton concerning statements made by defendant to him at the station. Defendant's counsel advised the court that the defendant's written statement to Dayton, which had not been offered in evidence, was to the effect that defendant planned to break into the clubhouse, find keys to the golf carts so he could take a cart to Beula Park and then return it, just to see if he could do it. The trial court granted the State's motion in limine, and defendant rested without presenting evidence.
At the conference on instructions defense counsel also offered instructions on criminal trespass to land (Illinois Pattern Jury Instructions (IPI), Criminal, Nos. 16.05, 16.06 (2d ed. 1981)), arguing that while criminal trespass to land is not a lesser-included offense of burglary, the instruction should be given where the evidence produced at trial supports a conviction for that offense. The instructions were refused.
At the sentencing hearing, the trial judge remarked that he was precluded from sentencing defendant to probation because he had been convicted of burglary in Pennsylvania in 1982. After a sentencing hearing, the trial court found that probation should be denied and a sentence of imprisonment imposed for the reason that imprisonment was necessary for the protection of the public. The trial court thereupon imposed a three-year term of imprisonment, and this appeal followed.
 1 Defendant contends first that the trial court erred in excluding his exculpatory statement made after his arrest at the police station as hearsay. Defendant concedes that under the hearsay rule a party is ordinarily excluded from proving his own out-of-court self-serving statements. (People v. Colletti (1968), 101 Ill. App.2d 51, 242 N.E.2d 63, cert. denied (1969), 396 U.S. 927, 24 L.Ed.2d 225, 90 S.Ct. 259.) He argues, however, his statement was admissible here because the State opened the door to its admission when on direct examination it brought out the fact that defendant had made statements *342 to Officer Dayton at the police station, and because the State failed to object on cross-examination to references that defendant had made statements to Dayton. Defendant argues that by allowing the jury to hear this testimony it may have been misled into thinking defendant had made no statement to Dayton that he intended to bring the cart back and, as the State made first reference to this conversation, defendant should be permitted to clarify what he did say to Dayton.
It is true that where a portion of a conversation is related by a witness the opposing party has the right to bring out all of the conversation. (People v. Weaver (1982), 92 Ill.2d 545, 556-57, 442 N.E.2d 255; People v. Futia (1983), 116 Ill. App.3d 68, 71, 452 N.E.2d 109; Johnson v. Cunningham (1969), 104 Ill. App.2d 406, 414, 244 N.E.2d 205; Dispenza v. Picha (1968), 98 Ill. App.2d 110, 113, 240 N.E.2d 325.) It is also true, however, that this hearsay exception does not apply if the testimony to which reference was made was not a part of the conversation the opposing party is attempting to introduce on cross-examination. Here, the single reference Samuelian made on direct examination, that defendant made a statement at the police station, and Samuelian's later reference to the conversation on cross-examination, does not open the door to its admission or waive the State's objection to defendant's hearsay self-serving statement.
In context, Samuelian stated on cross-examination that while in the squad car defendant told him that he had intended to use the cart for a joy ride and he did not recall if defendant stated he was going to return it. Defense counsel then posed several questions regarding defendant's conversation with Dayton in the station, to which Samuelian responded that he was in and out of the interrogation room, but did not recall what defendant had told Dayton and did not see defendant make a written statement. After that, defense counsel asked him:
"Q. You said you don't recall if he told you he was going to bring the cart back, is that right?
A. Yes. I don't remember him saying he was going to bring it back."
It is apparent Samuelian was referring to his earlier conversation with defendant in the squad car and not to any conversation defendant may have had with Dayton. Samuelian had just responded to an earlier question that he had no recollection of what defendant had told Dayton and did not see him make a written statement. It is also apparent that the jury could not be misled into thinking defendant's exculpatory statements were not made as Samuelian had testified he was in and out of the room during the conversation with Dayton and *343 any statement he intended to bring the cart back could have taken place while Samuelian was out of the room.
 2 Nor did the State waive its objection to this testimony; it promptly objected when the defendant sought to introduce the details of the conversation between defendant and Officer Dayton.
 3 Defendant next contends the trial court erred in refusing his tendered instruction on criminal trespass to land as an alternate offense to the burglary. He argues that as the evidence presented at trial could support a conviction for that offense, the jury should have been instructed on this lesser offense.
A defendant is entitled to an instruction on a lesser-included offense when all of the elements of that offense are included within the greater offense and if there is some foundation in the evidence which would support a conviction for the lesser offense. (People v. Dace (1983), 114 Ill. App.3d 908, 916, 449 N.E.2d 1031, appeal allowed (1983), 96 Ill.2d 543.) However, since burglary does not require prior notice to defendant (Ill. Rev. Stat. 1981, ch. 38, par. 21-3(b)), which is a necessary element of criminal trespass to land, the latter is not a lesser-included offense of burglary and defendant would not be entitled to the instructions offered under this traditional definition.
Defendant appears to rely upon the "inherent relationship" test wherein instructions may be offered on the elements of a lesser offense when the evidence produced at trial could support a conviction for that offense and when there is an inherent relationship between the greater and lesser offenses, although the lesser offense may not be included. (People v. Dace (1983), 114 Ill. App.3d 908, 449 N.E.2d 1031; United States v. Johnson (9th Cir.1980), 637 F.2d 1224, 1238-39.) Although adopted by some Federal courts (United States v. Johnson (9th Cir.1980), 637 F.2d 1224; United States v. Pino (10th Cir.1979), 606 F.2d 908, 916; United States v. Whitaker (D.C. Cir.1971), 447 F.2d 314, 319), and the appellate court for the third district (People v. Dace (1983), 114 Ill. App.3d 908, 449 N.E.2d 1031), this court has expressly declined to recognize the test on the grounds that it would usurp the State's function to choose under which statute a defendant will be prosecuted. People v. Barkenlau (1982), 105 Ill. App.3d 785, 788-90, 434 N.E.2d 856.
 4 While we do not depart from our opinion in People v. Barkenlau, it is apparent that defendant would not be entitled to the tendered instructions for the lesser offense under either test. In order to be convicted of criminal trespass of land there must be evidence that defendant knowingly entered upon land of another and that immediately prior to entry he received notice that entry was forbidden. A *344 person has received notice within the meaning of the statute if a printed or written notice forbidding such entry has been conspicuously posted or exhibited at the main entrance to the forbidden land. (Ill. Rev. Stat. 1981, ch. 38, par. 21-3(b).) In the present case the evidence was insufficient to permit a jury to find that defendant had received the requisite notice. The only evidence which arguably might tend to show that entry was forbidden was that there was a sign posted further down from the entrance leading to the clubhouse which stated "Do not climb the fence." There is nothing in the record indicating the relationship of the sign to the main entrance or whether it was posted conspicuously so that it could be inferred defendant had observed it.
We conclude that the trial court did not err in refusing the tendered instructions.
 5, 6 Defendant finally contends that the trial court erred in finding it was precluded from sentencing him to probation because of his prior conviction for burglary in Pennsylvania in 1982. Section 5-5-3(c)(2)(F) of the Unified Code of Corrections (Ill. Rev. Stat. 1981, ch. 38, par. 1005-5-3(c)(2)(F)) provides that a trial court may not sentence a defendant to probation for an offense that is:
"A Class 2 or greater felony if the offender has been convicted of a Class 2 or greater felony within ten years of the date on which he committed the offense for which he is being sentenced; * * *."
Defendant argues that this reference to the Illinois classification of Class 2 felonies indicates that the section only encompasses Illinois convictions. He notes that, in contrast, section 33B-1 of the habitual criminal act of the Criminal Code of 1961 (Ill. Rev. Stat. 1981, ch. 38, par. 33B-1) defines a habitual criminal as one "who has been twice convicted in any state or federal court of an offense that contains the same elements as an offense now classified in Illinois as a Class X felony or murder." Defendant concludes that as section 33B-1 refers to other State and Federal convictions in that context, the absence of similar language in section 5-5-3(c)(2)(F) demonstrates the legislative intent that the latter applies to prior Illinois convictions only in barring a sentence of probation.
While penal statutes must be strictly construed (People v. McCarty (1983), 94 Ill.2d 28, 445 N.E.2d 298), and any amibiguity should be resolved in the defendant's favor, prime consideration in construing a legislative enactment is to ascertain and give effect to the legislative intent. (People v. Rogers (1980), 86 Ill. App.3d 1092, 1093-94, 408 N.E.2d 769.) Where the statutory language is clear and *345 unambiguous, the statute must be given effect without resort to other aids for construction. (People v. Boykin (1983), 94 Ill.2d 138, 445 N.E.2d 1174.) Where, however, the language is susceptible of different interpretations, to ascertain a legislative intent, it may be necessary to look beyond express words and to consider the purpose to be served by the statute. (Mack v. Seaman (1983), 113 Ill. App.3d 151, 154, 446 N.E.2d 1217; Illinois Racing Board v. Arlington Park Thoroughbred Race Track Corp. (1979), 76 Ill. App.3d 289, 292, 395 N.E.2d 93.) Also, where the legislature has provided reasonable definitions of any terms within its enactment, such definitions for the purposes of its acts will be sustained. (Mack v. Seaman (1983), 113 Ill. App.3d 151, 154, 446 N.E.2d 1217; Chicago-Midwest Meat Association v. City of Evanston (1981), 96 Ill. App.3d 966, 969, 422 N.E.2d 205.) Furthermore, separate acts with separate purposes need not define similar terms in the same way. Therefore, the meaning of words within the statute is dependent upon the connection in which the word is used, the object or purpose of the statute and the consequences which probably will result from the proposed construction. Mack v. Seaman (1983), 113 Ill. App.3d 151, 154, 446 N.E.2d 1217; People ex rel. De Boer v. Geary (1944), 323 Ill. App. 32, 39, 54 N.E.2d 840.
Section 5-5-3(c)(2)(F) is not part of the Criminal Code of 1961, as is section 33B-1, but rather is part of the Unified Code of Corrections. Therefore, application of section 5-5-3(c)(2)(F) is limited, by the terms of that act, to the other provisions contained within the sentencing act. See Ill. Rev. Stat. 1981, ch. 38, par. 1005-1-1.
Within the sentencing article, section 5-5-3.2(b)(1) of the Unified Code of Corrections (Ill. Rev. Stat. 1981, ch. 38, par. 1005-5-3.2(b)(1)), limits the trial court's consideration as to whether to impose an extended-term sentence on a defendant to Illinois convictions only. Similarly, section 5-5-3(c)(6) of the Code (Ill. Rev. Stat. 1981, ch. 38, par. 1005-5-3(c)(6)) directs that certain defendants who have been twice convicted of Class 2 or greater felonies in Illinois shall be sentenced as Class X offenders. The fact that the legislature authorizes a trial court to consider only Illinois convictions when deciding to enhance a sentence, while the same limitation is absent from the provision limiting a trial court's authority to sentence a defendant to probation, indicates that the legislature intended different results. Aurora Pizza Hut, Inc. v. Hayter (1979), 79 Ill. App.3d 1102, 1105-06, 398 N.E.2d 1150.
 7 It is apparent that when the legislature intended in the Act to limit sentencing considerations to defendant's conduct within this *346 State, that it will expressly do so. While the definition of "offense" in the Act is limited to violations of Illinois State law (Ill. Rev. Stat. 1981, ch. 38, par. XXXX-X-XX), the Act also provides that "the words and phrases described in this Article have the meanings designated in this Article, except when a particular context clearly requires a different meaning" (Ill. Rev. Stat. 1981, ch. 38, par. 1005-1-1). We conclude that section 5-5-1 which states that "provisions of this Article shall govern the classification of all offenses for sentencing purposes" (Ill. Rev. Stat. 1981, ch. 38, par. 1005-5-1), is not limited to offenses committed in Illinois, as defendant argues, but is also to be applied to out-of-State offenses considered for purposes of sentencing.
 8 Defendant has not suggested that his conviction for burglary in the State of Pennsylvania was for conduct which, in Illinois, would be classified less than a Class 2 felony, and we may not disregard the unambiguous language of section 5-5-3(c)(2)(F), which thus bars a sentence of probation.
We note, too, the trial court did not rely solely upon consideration of this section of the Code, but also found that probation should be denied and a sentence of imprisonment imposed for the protection of the public.
Accordingly, the judgment of the trial court will be affirmed.
Affirmed.
SEIDENFELD, P.J., and UNVERZAGT, J., concur.
