1 // fprint() for cl_SV_ringelt.
4 #include "base/cl_sysdep.h"
7 #include "cln/SV_ringelt.h"
12 #include "cln/output.h"
16 void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& vector)
18 const cl_print_flags& flags = default_print_flags;
19 std::size_t len = vector.size();
20 if (flags.vector_syntax == vsyntax_commonlisp) {
21 fprintchar(stream,'#');
22 fprintchar(stream,'(');
24 fprintchar(stream,'[');
25 for (std::size_t i = 0; i < len; i++) {
27 if (flags.vector_syntax == vsyntax_algebraic)
28 fprintchar(stream,',');
29 fprintchar(stream,' ');
31 R->_fprint(stream,vector[i]);
33 if (flags.vector_syntax == vsyntax_commonlisp)
34 fprintchar(stream,')');
36 fprintchar(stream,']');