gmp_lib.mpq_clears Method

GMP Native Interface for .NET

gmp_libmpq_clears Method
Free the space occupied by a NULL-terminated list of mpq_t variables.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void mpq_clears(
	params mpq_t[] x
)
Public Shared Sub mpq_clears ( 
	ParamArray x As mpq_t()
)
public:
static void mpq_clears(
	... array<mpq_t^>^ x
)
static member mpq_clears : 
        x : mpq_t[] -> unit 

Parameters

x
Type: Math.Gmp.Nativempq_t
The operand rational.
Examples
// Create new rationals x1, x2 and x3.
mpq_t x1 = new mpq_t();
mpq_t x2 = new mpq_t();
mpq_t x3 = new mpq_t();

// Initialize the rationals.
gmp_lib.mpq_inits(x1, x2, x3, null);

// Assert that their value is 0.0.
Assert.IsTrue(gmp_lib.mpq_get_d(x1) == 0.0);
Assert.IsTrue(gmp_lib.mpq_get_d(x2) == 0.0);
Assert.IsTrue(gmp_lib.mpq_get_d(x3) == 0.0);

// Release unmanaged memory allocated for the rationals.
gmp_lib.mpq_clears(x1, x2, x3, null);
' Create new rationals x1, x2 and x3.
Dim x1 As New mpq_t()
Dim x2 As New mpq_t()
Dim x3 As New mpq_t()

' Initialize the rationals.
gmp_lib.mpq_inits(x1, x2, x3, Nothing)

' Assert that their value is 0.0.
Assert.IsTrue(gmp_lib.mpq_get_d(x1) = 0.0)
Assert.IsTrue(gmp_lib.mpq_get_d(x2) = 0.0)
Assert.IsTrue(gmp_lib.mpq_get_d(x3) = 0.0)

' Release unmanaged memory allocated for the rationals.
gmp_lib.mpq_clears(x1, x2, x3, Nothing)

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also