gmp_libmpz_init Method |
Namespace: Math.Gmp.Native
public static void mpz_init( mpz_t x )
Public Shared Sub mpz_init ( x As mpz_t )
public: static void mpz_init( mpz_t^ x )
static member mpz_init : x : mpz_t -> unit
// Create and initialize a new integer x. mpz_t x = new mpz_t(); gmp_lib.mpz_init(x); // Assert that the value of x is 0. char_ptr s = gmp_lib.mpz_get_str(char_ptr.Zero, 10, x); Assert.IsTrue(s.ToString() == "0"); // Release unmanaged memory allocated for x and its string value. gmp_lib.mpz_clear(x); gmp_lib.free(s);
' Create and initialize a new integer x. Dim x As New mpz_t() gmp_lib.mpz_init(x) ' Assert that the value of x is 0. Dim s As char_ptr = gmp_lib.mpz_get_str(char_ptr.Zero, 10, x) Assert.IsTrue(s.ToString() = "0") ' Release unmanaged memory allocated for x and its string value. gmp_lib.mpz_clear(x) gmp_lib.free(s)
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.