You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. // I/O of complex numbers.
  2. #ifndef _CL_COMPLEX_IO_H
  3. #define _CL_COMPLEX_IO_H
  4. #include "cln/number_io.h"
  5. #include "cln/complex.h"
  6. namespace cln {
  7. // Undocumented input functions
  8. extern const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse);
  9. extern const cl_N read_complex (std::istream& stream, const cl_read_flags& flags);
  10. // Documented input functions
  11. inline std::istream& operator>> (std::istream& stream, cl_N& result)
  12. {
  13. extern cl_read_flags cl_N_read_flags;
  14. result = read_complex(stream,cl_N_read_flags);
  15. return stream;
  16. }
  17. // Undocumented output functions
  18. // Documented output functions
  19. // Gibt eine komplexe Zahl aus.
  20. // print_complex(stream,z);
  21. // > z: komplexe Zahl
  22. // > stream: Stream
  23. extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z);
  24. extern void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z);
  25. inline void fprint (std::ostream& stream, const cl_N& x)
  26. {
  27. extern cl_print_flags default_print_flags;
  28. print_complex(stream,default_print_flags,x);
  29. }
  30. CL_DEFINE_PRINT_OPERATOR(cl_N)
  31. } // namespace cln
  32. #endif /* _CL_COMPLEX_IO_H */