
178 Cal.App.3d 898 (1986)
224 Cal. Rptr. 204
THE PEOPLE, Plaintiff and Respondent,
v.
WILLIAM SAM MOORE, Defendant and Appellant.
Docket No. F004907.
Court of Appeals of California, Fifth District.
March 13, 1986.
*900 COUNSEL
Richard K. Brewster, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, W. Scott Thorpe, Garrett Beaumont and David Rhodes, Deputy Attorneys General, for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
HAMLIN, J.
Defendant William Sam Moore was charged with attempted murder (Pen. Code, §§ 664/187),[1] assault with a deadly weapon (§ 245, subd. (a)(1)), and personal use of a firearm (§ 12022.5). Pursuant to a plea bargain, defendant pleaded guilty to the assault charge and admitted the use of the firearm. The attempted murder charge was dismissed.
The trial court sentenced defendant to the upper term of four years for the assault and enhanced that sentence by two years for the firearm use. The court also imposed a restitution fine of $2,000 pursuant to Government Code section 13967.
Defendant appeals from this judgment, contending that he should be allowed to withdraw his guilty plea because the court erroneously advised him of the potential amount of the restitution fine and he did not knowingly and intelligently enter his guilty plea. In addition, he urges that the court erred in imposing the upper term and the enhancement. Finally, he contends he was denied effective assistance of counsel. We find no merit in defendant's contentions; we will affirm the judgment.

FACTS
On August 6, 1984, defendant was living with Laura Ryals in her home. As a result of a dispute over money, defendant secured possession of a .22 caliber rifle. When Ryals attempted to persuade defendant to put away the rifle, defendant pushed Ryals to the floor. He then denied Ryals' daughter, Illene Line, and Ryals' grandson, William Lucio, entrance to Ryals' home. When Line entered to assist Ryals and Lucio attempted to follow her, defendant shot Lucio in the throat and struck Line on the head with the barrel of the rifle, lacerating her scalp. Defendant told the investigating officers he used the rifle in self-defense.
*901 Additional facts surrounding defendant's guilty plea will be stated as pertinent to consideration of defendant's contentions.

DISCUSSION

I-III[*]
.... .... .... .... .... .... .

IV.
(1a) Defendant urges that the trial court erred by imposing an enhancement under section 12022.5 because that statute is inapplicable to section 245, subdivision (a)(1) convictions. He specifically contends that assault with a firearm constitutes a violation of section 245, subdivision (a)(2) only. The People counter that assault with a firearm may also trigger a violation of section 245, subdivision (a)(1), and that an enhancement is proper under section 12022.5.
Before section 245 was amended in 1982, it provided in relevant part:
"(a) Every person who commits an assault upon the person of another with a deadly weapon or instrument or by any means of force likely to produce great bodily injury is punishable by imprisonment in the state prison for two, three or four years, or in a county jail not exceeding one year, or by fine not exceeding five thousand dollars ($5,000), or by both such fine and imprisonment....
"(b) Every person who commits an assault with a deadly weapon or instrument or by any means likely to produce great bodily injury upon the person of a peace officer or fireman, and who knows or reasonably should know that such victim is a peace officer or fireman engaged in the performance of his duties, when such peace officer or fireman is engaged in the performance of his duties shall be punished by imprisonment in the state prison for three, four, or five years.
".... .... .... .... .... .... ."
In order to prove a section 245 violation before the 1982 amendment, the prosecution had to establish that a person was assaulted with a deadly weapon *902 or instrument or by means of force likely to produce great bodily injury. (In re Jose R. (1982) 137 Cal. App.3d 269, 275 [186 Cal. Rptr. 898].)
In People v. Claborn (1964) 224 Cal. App.2d 38 [36 Cal. Rptr. 132], the defendant used his car to run down a victim. The court stated: "There can be no doubt that an automobile used, as the facts show defendant's car was used here, was `a deadly weapon' or `instrument' or `force likely to produce great bodily injury.'" (Id., at p. 42.) Thus, an assault could entail all three statutory descriptions.
In 1982, section 245 was amended to provide in relevant part:
"(a)(1) Every person who commits an assault upon the person of another with a deadly weapon or instrument other than a firearm or by any means of force likely to produce great bodily injury is punishable by imprisonment in the state prison for two, three or four years, or in a county jail not exceeding one year, or by fine not exceeding five thousand dollars ($5,000), or by both such fine and imprisonment.
"(2) Every person who commits an assault upon the person of another with a firearm is punishable by imprisonment in the state prison for two, three, or four years, or in a county jail for a term of not less than six months and not exceeding one year, or by both a fine not exceeding five thousand dollars ($5,000) and imprisonment.
".... .... .... .... .... .... ."
The 1982 amendment makes several changes: First, it adds the phrase "other than a firearm" immediately after "or instrument" in what was formerly subdivision (a) and it designates the changed provision paragraph (1) of subdivision (a); and second, it adds a new paragraph (2) to specifically proscribe an assault with a firearm without reference to force likely to produce great bodily injury and to require punishment by imprisonment in a county jail for not less than six months.
At the same session, the Legislature adopted a new section 12022.5 governing enhancement of sentences for personal use of a firearm to become effective at the same time as the amendment to section 245. The new section 12022.5 provides: "Any person who personally uses a firearm in the commission or attempted commission of a felony shall, upon conviction of such felony or attempted felony, in addition and consecutive to the punishment prescribed for the felony or attempted felony of which he or she has been convicted, be punished by an additional term of imprisonment in the state *903 prison for two years, unless use of a firearm is an element of the offense of which he or she was convicted.
"The additional term provided by this section may be imposed in cases of assault with a firearm under paragraph (2) of subdivision (a) of Section 245, or assault with a deadly weapon which is a firearm under Section 245.
".... .... .... .... .... .... ."
The second paragraph specifically authorizes the imposition of the two-year enhancement in cases of assault with a firearm under new paragraph (2) of subdivision (a) of section 245 or "with a deadly weapon which is a firearm under Section 245."
Defendant's contentions require us to decide the effect of the 1982 amendments to sections 245 and 12022.5.
(2) In interpreting a statute, courts must ascertain legislative intent so as to effectuate a law's purpose. (E.g., Palos Verdes Faculty Assn. v. Palos Verdes Peninsula Unified Sch. Dist. (1978) 21 Cal.3d 650, 658 [147 Cal. Rptr. 359, 580 P.2d 1155].) The judicial function is limited to interpreting the statute based on the language used. (Anderson v. I.M. Jameson Corp. (1936) 7 Cal.2d 60, 67 [59 P.2d 962].) We must "ascertain and declare what is ... contained therein, not to insert what has been omitted, or to omit what has been inserted, ..." (Code Civ. Proc., § 1858.) (3) Moreover, "`[w]hen different language is used in the same connection in different parts of a statute it is presumed the legislature intended a different meaning and effect.'" (People v. Ector (1965) 231 Cal. App.2d 619, 625 [42 Cal. Rptr. 388].)
With these principles in mind, we note first that both paragraph (1) and paragraph (2) of subdivision (a) of section 245 prescribe the same potential punishment. Similarly, section 12022.5 provides for a two-year discretionary enhancement for assault with a firearm and for an assault with a deadly weapon which is a firearm under section 245. The only difference in the punishment specified in subparagraphs (1) and (2) of subdivision (a) of section 245 is that paragraph (2) requires at least six months' incarceration. It thus appears a violation of paragraph (2) is a more serious offense than violation of paragraph (1) only because punishment by incarceration is required for the former. (4) A defendant may be convicted under paragraph (2) without proof that the assault was likely to cause great bodily injury.
The foregoing considerations suggest the prosecution would ordinarily prefer to charge an assault with a firearm as a violation of paragraph (2) of *904 subdivision (a). However, we believe the prosecution is not precluded by the more specific provisions of paragraph (2) of subdivision (a) from charging an assault with a firearm under paragraph (1) of that subdivision if it so elects.
An assault with a firearm necessarily satisfies the additional requirement of paragraph (1) that it constitute an assault by means of force likely to cause great bodily injury. (Cf. People v. Claborn, supra, 224 Cal. App.2d at p. 42.) (5) Moreover, our review of the legislative history of the 1982 amendment to section 245 convinces us the purpose of the amendment was to make it possible for the prosecutor to assure that a defendant would be imprisoned for at least six months if he charged the defendant with an assault with a firearm and obtained a conviction. No other substantive changes were intended.
Additionally, the punctuation the Legislature used in subdivision (b) of section 245[4]  a comma before and after the limiting language "other than a firearm"  indicates an intent to limit both "deadly weapon" and "instrument." Something less must have been intended by the adoption of the same limiting language in paragraph (1) of subdivision (a) without the use of a comma before and after it. In our view, the Legislature intended that the limiting language apply only to "instrument," the word it immediately follows without intervening punctuation. In so doing it expressed an intent to proscribe an assault with a firearm under the provisions of both paragraph (1) and paragraph (2) of subdivision (a) of section 245.
(1b) Finally, the second paragraph of section 12022.5, quoted above, is consistent only with legislative recognition that section 245 proscribes an assault with a deadly weapon which is a firearm by a provision in addition to paragraph (2) of subdivision (a). There would be no other reason for mentioning separately paragraph (2) of subdivision (a) and "assault with a deadly weapon which is a firearm under section 245."
Thus, we conclude that defendant was properly charged with an assault with a deadly weapon under section 245, subdivision (a)(1) and convicted of violating that statutory provision by his guilty plea and that the court properly imposed an enhancement under section 12022.5.


*905 V.[*]
.... .... .... .... .... .... .
The judgment is affirmed.
Franson, Acting P.J., and Reid, J.,[] concurred.
NOTES
[*]   Pursuant to California Rules of Court, rule 976.1, this opinion is certified for publication with the exceptions of parts I, II, III and V.
[1]  Further statutory references are to the Penal Code unless otherwise indicated.
[*]   See footnote on page 898, ante.
[4]  Section 245, subdivision (b) provides in relevant part: "Every person who commits an assault with a deadly weapon or instrument, other than a firearm, or by means likely to produce great bodily injury upon the person of a peace officer or fireman, ..."
[]   Assigned by the Chairperson of the Judicial Council.
