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.

46 lines
1.1 KiB

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