gmp_libmpz_init_set Method |
Namespace: Math.Gmp.Native
public static void mpz_init_set( mpz_t rop, mpz_t op )
Public Shared Sub mpz_init_set ( rop As mpz_t, op As mpz_t )
public: static void mpz_init_set( mpz_t^ rop, mpz_t^ op )
static member mpz_init_set : rop : mpz_t * op : mpz_t -> unit
// Create, initialize, and set a new integer y to -210. mpz_t y = new mpz_t(); gmp_lib.mpz_init(y); gmp_lib.mpz_set_si(y, -210); // Create, initialize, and set a new integer x to the value of y. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set(x, y); // Assert that x is equal to the value of y. Assert.IsTrue(gmp_lib.mpz_get_si(x) == -210); // Release unmanaged memory allocated for x and y. gmp_lib.mpz_clears(x, y, null);
' Create, initialize, and set a new integer y to -210. Dim y As New mpz_t() gmp_lib.mpz_init(y) gmp_lib.mpz_set_si(y, -210) ' Create, initialize, and set a new integer x to the value of y. Dim x As New mpz_t() gmp_lib.mpz_init_set(x, y) ' Assert that x is equal to the value of y. Assert.IsTrue(gmp_lib.mpz_get_si(x) = -210) ' Release unmanaged memory allocated for x and y. gmp_lib.mpz_clears(x, y, 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.