7 #include "cln/GV_complex.h"
8 #include "cln/GV_real.h"
9 #include "cln/GV_rational.h"
10 #include "cln/GV_integer.h"
16 #include "cln/output.h"
20 void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector)
22 var uintC len = vector.length();
23 if (flags.vector_syntax == vsyntax_commonlisp) {
24 fprintchar(stream,'#');
25 fprintchar(stream,'(');
27 fprintchar(stream,'[');
28 for (var uintC i = 0; i < len; i++) {
30 if (flags.vector_syntax == vsyntax_algebraic)
31 fprintchar(stream,',');
32 fprintchar(stream,' ');
34 // The conversion to cl_number below is needed for SGI CC.
35 printfun(stream,flags,(cl_number)vector[i]);
37 if (flags.vector_syntax == vsyntax_commonlisp)
38 fprintchar(stream,')');
40 fprintchar(stream,']');