---
title: "Access Functions"
canonical: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/access.html"
source: "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/access.md"
part: "Coding Theory"
chapter: "Algebraic-Geometric Codes"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Coding Theory", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/index-coding-theory.md"}
  - {"title": "Algebraic-Geometric Codes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/index-algebraic-geometric-codes.md"}
prev: {"title": "Properties of AG–Codes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/properties.md"}
next: {"title": "Decoding AG Codes", "source": "https://docs.magma-maths.org/v2.30-1/CodingTheory/AlgebraicGeometricCodes/decode.md"}
intrinsics:
  - {"name": "Curve", "signature": "Curve(C): Code -> Crv"}
  - {"name": "GeometricSupport", "signature": "GeometricSupport(C): Code -> DivCrvElt"}
  - {"name": "Divisor", "signature": "Divisor(C): Code -> DivCrvElt"}
  - {"name": "GoppaDesignedDistance", "signature": "GoppaDesignedDistance(C): Code -> RngIntElt"}
---

# Access Functions

At the time an AG–Code is constructed a number of attributes describing its construction are stored along with the code. The functions in this section give the user access to these attributes.

<a id="function-curve-code"></a>
## `Curve(C): Code -> Crv`

Given an algebraic–geometric code $C$, returns the curve from which $C$ was defined.

<a id="function-geometricsupport-code"></a>
## `GeometricSupport(C): Code -> DivCrvElt`

Given an algebraic–geometric code $C$, return the sequence of places which forms the support for $C$.

<a id="function-divisor-code"></a>
## `Divisor(C): Code -> DivCrvElt`

Given an algebraic–geometric code $C$, return the divisor from which $C$ was constructed.

<a id="function-goppadesigneddistance-code"></a>
## `GoppaDesignedDistance(C): Code -> RngIntElt`

Given an algebraic–geometric code $C$ constructed from a divisor $D$, return the Goppa designed distance $n - deg(D)$.
