
141 S.W.3d 250 (2004)
Alejandro ROBLES, Appellant,
v.
The STATE of Texas, Appellee.
No. 03-03-00452-CR.
Court of Appeals of Texas, Austin.
July 1, 2004.
John F. Lopez, Florey, Keel, & Nassour L.L.P., Austin, for appellant.
Lisa Stewart, Asst. Dist. Atty., Austin, for appellee.
Before Justices KIDD, B.A. SMITH and PEMBERTON.

OPINION
BOB PEMBERTON, Justice.
A jury found appellant Alejandro Robles guilty of aggravated assault with a deadly weapon and sentenced him to six years' imprisonment. See Tex. Pen.Code Ann. § 22.02(a)(2)-(b) (West Supp.2004). Robles *251 appeals his sentence, claiming that the district court erred by: (1) permitting the State to enhance the range of punishment based on Robles's prior felony conviction in Puerto Rico; (2) allowing his prior felony conviction from Puerto Rico to bar him from eligibility for probation; and (3) not granting Robles credit towards his sentence for time served between the date of his arrest and the date of his sentencing. We affirm Robles's conviction, but modify the judgment to give him the time credit to which he is entitled.

BACKGROUND
Robles was charged with two counts of aggravated assault with a deadly weapon and one count of aggravated robbery. The indictment contained an enhancement paragraph whereby the State sought to enhance the punishment to which Robles was exposed pursuant to section 12.42(b) of the Texas Penal Code, alleging Robles had a prior felony conviction from Puerto Rico.[1]Id. § 12.42 (West Supp.2004). Robles filed a motion to quash the indictment, arguing that prior felony convictions from Puerto Rico should not be considered for enhancement purposes. Additionally, Robles argued that the prior felony conviction from Puerto Rico should not bar him from consideration for probation under article 42.12, section 4(e) of the Texas Code of Criminal Procedure. Tex.Code Crim. Proc. Ann. art. 42.12 § 4(e) (West Supp. 2004). The district court denied Robles's motion to quash.
Robles was subsequently convicted on one count of aggravated assault with a deadly weapon, a second degree felony. He was acquitted of all other charges. At the punishment phase of trial, Robles admitted to the prior felony conviction in Puerto Rico. On this basis, Robles's conviction was enhanced to a first degree felony pursuant to section 12.42(b). The jury sentenced Robles to six years' imprisonment. The district court entered judgment without giving Robles credit towards his sentence for time served. See id. art. 42.03, § 2(a) (West Supp.2004) (requiring judge of court in which defendant was convicted to give defendant jail credit from time of his arrest and confinement until his sentence by the trial court).

DISCUSSION

Standard of review
The questions presented are matters of statutory construction. Matters of statutory construction are questions of law. Johnson v. City of Fort Worth, 774 S.W.2d 653, 656 (Tex.1989). Therefore, the district court's ruling is subject to de novo review. Johnson v. State, 954 S.W.2d 770, 771 (Tex.Crim.App.1997).

Enhancement
The first issue presented is whether a prior felony conviction from Puerto Rico may be used for enhancement purposes. Section 12.42(b) of the Texas Penal Code provides: "If it is shown on the trial of a second-degree felony that the defendant has been once before convicted of a felony, on conviction he shall be punished for a first-degree felony." Tex. Pen.Code Ann. § 12.42(b). The Legislature has defined "felony" as used in section 12.42(b) elsewhere in the penal code. "Felony" as defined in the penal code means "an offense *252 so designated by law or punishable by death or confinement in a penitentiary." Id. § 1.07(a)(23) (West Supp.2004). Additionally, for enhancement purposes, "any conviction not obtained from a prosecution under this [penal] code shall be classified as . . . [a] `felony of the third degree' if imprisonment in a penitentiary is affixed to the offense as a possible punishment." Id. § 12.41(1) (West 2003). Thus, a second degree felony can be enhanced to a first degree felony where the defendant has previously been convicted of a felony, defined as either (a) an offense designated as a felony by the penal code, (b) an offense punishable by death or confinement in a penitentiary under the penal code, or (c) an offense defined outside of the penal code punishable by imprisonment in a penitentiary.
Robles does not dispute that his prior conviction was punishable by imprisonment in a penitentiary. Therefore, we must decide only whether such convictions from Puerto Rico may be used for enhancement purposes.
Section 12.41(1) has been held to apply to prior convictions obtained under Texas statutes other than the current penal code, as well as to previous convictions obtained outside of Texas under the laws of other states and the federal government. See, e.g., Childress v. State, 784 S.W.2d 361, 365 (Tex.Crim.App.1990) (classifying defendant's prior conviction for failing to stop and render aid as third degree felony where offense was defined by Texas Transportation Code and punishable by imprisonment); Trotti v. State, 698 S.W.2d 245, 246 (Tex.App.-Austin 1985, pet. ref'd) (classifying prior conviction for offense of "house breaking and larceny" in South Carolina as third degree felony under section 12.41(1) because confinement in penitentiary was affixed to offense as possible punishment); Ex parte Blume, 618 S.W.2d 373, 376 (Tex.Crim.App.1981) (holding that prior felony convictions under federal law may be classified as third degree felonies for enhancement purposes); Moreno v. State, 541 S.W.2d 170, 174 (Tex.Crim.App. 1976) (prior felony convictions under former penal code were considered felonies to third degree for enhancement purposes). It appears that there are no decisions specifically addressing whether section 12.41(1) applies to prior felony convictions from Puerto Rico. Likewise, Texas courts have not addressed whether prior felony convictions from foreign nations may be used for enhancement.
Robles concedes that section 12.41(1) has been interpreted to allow prior felony convictions obtained in federal courts and in courts of other states to be used for enhancement purposes. However, Robles contends that felony convictions from foreign nations are not allowed to be used for enhancement purposes and that Puerto Rico is akin to a foreign nation for these purposes. He urges that because Puerto Rico is not a state for enhancement purposes and his prior felony conviction was not obtained in federal court, section 12.41(1) should not apply to his previous felony conviction. In support of the proposition that Puerto Rico is not a state for enhancement purposes, Robles lists numerous factors he asserts distinguish Puerto Rico from states of the United States, including:
(1) Puerto Rico's status as a "free associated state";
(2) That Puerto Rico residents are U.S. citizens, but not eligible to vote in presidential elections;
(3) That Puerto Rico has its own Olympic team; and
(4) That Puerto Rico's congressional representative may not vote on legislation.
*253 Robles also points to a number of characteristics of Puerto Rico that he believes justifies treating Puerto Rico more like a separate country than a state:
(5) The predominant use of the Spanish language;
(6) The requirement that visitors from Puerto Rico pass through U.S. customs upon entering the mainland United States;
(7) The exemption of Puerto Rican residents from the Internal Revenue Code; and
(8) Puerto Rico's independent participation in international organizations, such as the International Olympic Committee, the World Health Organization, and Interpol.
Robles concludes that Puerto Rico is by nature more like another country than a state, that it should therefore be treated as another country in applying section 12.41(1), and that prior felony convictions from Puerto Rico should not be used for enhancement under section 12.42 as a result. We disagree.
When construing a Texas statute, our paramount task is to ascertain the Texas legislature's intent in enacting that provision. Boykin v. State, 818 S.W.2d 782, 785 (Tex.1991). We first look to the plain and common meaning of the words the legislature used. Tex. Gov't Code Ann., Code Construction Act, § 311.011 (West 1998); Kroger Co. v. Keng, 23 S.W.3d 347, 349 (Tex.2000); Texas Workers' Comp. Comm'n v. Texas Builders Ins. Co., 994 S.W.2d 902, 908 (Tex.App.-Austin 1999, pet. denied). We are to presume that every word in a statute has been used for a purpose and that each word, phrase, clause, and sentence should be given effect. Whitelaw v. State, 29 S.W.3d 129, 131 (Tex.Crim.App.2000); see State v. Evangelical Lutheran Good Samaritan Soc'y, 981 S.W.2d 509, 511 (Tex.App.-Austin 1998, no pet.). Unless a statute is ambiguous, we abide by the clear language of the statute and enforce it as written. RepublicBank Dallas, N.A. v. Interkal, Inc., 691 S.W.2d 605, 607 (Tex.1985).
Also, the Legislature has prescribed that "[w]ords and phrases that have acquired a technical or particular meaning, whether by legislative definition or otherwise, shall be construed accordingly." Tex. Govt.Code Ann. § 311.011(b). The Code Construction Act also requires us to consider, among other things, statutory provisions on the same or similar subjects. Id. § 312.008 (West 1998). And, "[w]hen the same or a similar term is used in the same connection in different statutes, the term will be given the same meaning in one as in the other, unless there is something to indicate that a different meaning was intended." Guthery v. Taylor, 112 S.W.3d 715, 722 (Tex.App.-Houston [14th Dist.] 2003, no pet.). Finally, the Code Construction Act authorizes us to consider the "object sought to be attained" by the legislature when enacting the provision. Tex. Gov't Code Ann. § 311.023 (West 1998); see also In re Bell, 91 S.W.3d 784, 787 (Tex.2002) ("[The Act] makes clear that courts may consider the `legislative history' and the `object sought to be attained' in construing statutes.").
Robles suggests that section 12.41 permits use of convictions only from Texas' sister states, and not from foreign nations, for enhancement purposes. We note that "convictions not obtained from a prosecution under this [penal] code" is broadly worded, but we need not consider whether it embraces convictions from foreign jurisdictions. Even assuming, as Robles urges, that section 12.41 allows use of convictions only from other states, Puerto Rico would still be considered a "state" for these purposes. The Code Construction Act defines "state" as including "any state, district, *254 commonwealth, territory and insular possession of the United States and any area subject to the legislative authority of the United States of America." Tex. Gov't Code Ann. § 311.005 (West 2004). Puerto Rico is subject to the legislative authority of the United States. 48 U.S.C.A. § 734 (West Supp.2003). It is therefore a "state" for purposes of the penal code.[2]
Furthermore, this reading is consistent with the stated objectives of the penal code to "ensure the public safety through such punishment as may be necessary to prevent likely recurrence of criminal behavior." Tex. Pen.Code Ann. § 1.02(1)(C) (West 2003). Enhancing a defendant's sentence based on a previous felony conviction will have the same desired preventative effect whether that previous conviction is from Texas, South Carolina, federal court, or Puerto Rico. Conversely, to exempt those with prior felony convictions from Puerto Rico arbitrarily impairs the preventative intent of the enhancement statute in this context.
Because we hold that prior felony convictions from Puerto Rico may be used for enhancement purposes, we overrule Robles's first point of error.

Probation eligibility
Robles's second issue relates to whether his prior felony conviction from Puerto Rico prohibits him from consideration for community supervision under article 42.12, section 4(e) of the Texas Code of Criminal Procedure. Article 42.12 section 4(e) provides:
A defendant is eligible for community supervision under this section only if before the trial begins the defendant files a written sworn motion with the judge that the defendant has not previously been convicted of a felony in this or any other state, and the jury enters in the verdict a finding that the information in the defendant's motion is true.
Tex.Code Crim. Proc. Ann. art. 42.12, § 4(e) (West Supp.2004). Robles argues that the language "felony in this or any other state" suggests that a defendant is obligated to swear only to the absence of prior felony convictions obtained in Texas or any of the other forty-nine U.S. states. The State contends that Robles failed to preserve error on the issue, because (a) Robles failed to file a sworn affidavit denying prior felony convictions before trial, (b) the State showed beyond a reasonable doubt that he had previously been convicted of a felony, and (c) Robles failed to object to the judge's sentencing instructions which did not authorize the jury to consider community supervision as a possible punishment. In the alternative, the State argues that Robles's prior conviction precludes him from probation eligibility because Puerto Rico is a "state" within the meaning of article 42.12, section 4(e). We need not reach the waiver issue because we hold that "state" under article 42.12, section 4(e) includes Puerto Rico.
Although article 42.12 itself does not define "state," the Code Construction Act, as previously discussed, defines "state" to include Puerto Rico.[3] Tex. Gov't Code Ann. *255 § 311.005 (West 1998); see also 48 U.S.C.A. § 734. Additionally, the code of criminal procedure elsewhere adopts definitions of "state" that include Puerto Rico. See, e.g., Tex.Code Crim. Proc. Ann. art. 24.29 (West 1989); id. art. 42.19 (West Supp.2004); see Tex. Gov't Code Ann. § 311.011(b) ("[w]ords and phrases that have acquired a technical or particular meaning, whether by legislative definition or otherwise, shall be construed accordingly"). Thus, Robles's prior felony conviction from Puerto Rico precludes him from consideration for probation under article 42.12, section 4(e). We overrule Robles's second point of error.

Time credit
The record indicates that Robles was arrested and confined in this cause of action on June 27, 2002 and that he remained confined until sentenced on June 19, 2003. The code of criminal procedure requires:
In all criminal cases the judge of the court in which the defendant was convicted shall give the defendant credit on his sentence for the time that the defendant has spent in jail in said cause, other than confinement served as a condition of community supervision, from the time of his arrest and confinement until his sentence by the trial court.
Tex.Code Crim. Proc. Ann. art. 42.03, § 2(a) (West Supp.2004). Granting credit under this provision is mandatory. Ex parte Green, 688 S.W.2d 555, 557 (Tex. Crim.App.1985).
When sentencing Robles, the district court apparently overlooked the need to credit the time served by Robles between arrest and sentencing. The State concedes that Robles was entitled to credit for this time served. Accordingly, we sustain Robles's third point of error and modify the judgment to grant Robles credit towards his sentence for time served from June 27, 2002, until June 19, 2003.

CONCLUSION
We affirm the district court's judgment convicting Robles of aggravated robbery, but modify the judgment to grant Robles credit toward his sentence for time served.
NOTES
[1]  The indictment alleged that Robles "had been convicted of the felony offense of Violation of Art. 404, Possession of the Controlled Substances Act and Inf. Art. 404 Ley Sust. Controladas, on February 28, 1995, in cause number HSC95G0055 in the Superior Tribunal of Humacao, Puerto Rico, which conviction had become final before the commission of the offenses alleged" in this case. Robles pled "true" to the charge at the punishment phase of the trial.
[2]  Similarly, federal courts have held that Puerto Rico is a "state" as used in section 4B1.2 of the United States Sentencing Guidelines, thus allowing prior convictions from Puerto Rico to be used towards career offender status pursuant to section 4B1.1. See, e.g., United States v. Morales-Diaz, 925 F.2d 535 (1st Cir.1991) (reasoning that "Congress has accorded the Commonwealth of Puerto Rico the degree of autonomy and independence normally associate with States of the Union" and has been treated as a state in a variety of contexts).
[3]  Although section 311.002 of the Code Construction Act states that the act applies to codes enacted by the 60th or subsequent legislature and the code of criminal procedure is not a "code" within the meaning of the act, the Texas Court of Criminal Appeals has held that the Code Construction Act applies to the code of criminal procedure at least to the extent that the code has been amended by the 60th or subsequent legislatures. Ex parte Torres, 943 S.W.2d 469, 473 n. 5 (Tex.Crim.App. 1997); Tex. Gov't Code Ann. § 311.002 (West 1998). Article 42.12, section 4(e) was amended subsequent to the 60th legislature. Compare Tex.Code Crim. Proc. Ann. art. 42.12, § 4 (West 1979) with Tex.Code Crim. Proc. Ann. art. 42.12, § 4(e) (West Supp.2004).
