FLINT3.7.0-dev

_fmpz_vec_fread, _fmpz_vec_read

Synopsis#include <flint/fmpz_vec.h>
int _fmpz_vec_fread(FILE * file, fmpz ** vec, slong * len)source
int _fmpz_vec_read(fmpz ** vec, slong * len)source

Read a vector in the format of _fmpz_vec_fprint from file or stdin. Return a positive value on success and a nonpositive value on failure.

If *vec is NULL, the length is read from the stream, a vector of that length is allocated and assigned to *vec, and *len is set. On failure the vector is cleared and *vec and *len are set to NULL and 0.

If *vec is not NULL, (*vec, *len) must be an initialised vector, and the length read must equal *len; otherwise a parsing error is reported. On failure the vector is left in its current state, which may be partially overwritten.

Cite this page

The FLINT team, “_fmpz_vec_fread, _fmpz_vec_read (fmpz_vec.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_vec/_fmpz_vec_fread.html (generated 2026-10-20).