Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-19 08:08:30

0001 // I/O of complex numbers.
0002 
0003 #ifndef _CL_COMPLEX_IO_H
0004 #define _CL_COMPLEX_IO_H
0005 
0006 #include "cln/number_io.h"
0007 #include "cln/complex.h"
0008 
0009 namespace cln {
0010 
0011 // Input functions
0012 
0013 extern const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse);
0014 extern const cl_N read_complex (std::istream& stream, const cl_read_flags& flags);
0015 
0016 inline std::istream& operator>> (std::istream& stream, cl_N& result)
0017 {
0018     extern cl_read_flags cl_N_read_flags;
0019     result = read_complex(stream,cl_N_read_flags);
0020     return stream;
0021 }
0022 
0023 
0024 // Output functions
0025 
0026 // Gibt eine komplexe Zahl aus.
0027 // print_complex(stream,z);
0028 // > z: komplexe Zahl
0029 // > stream: Stream
0030 extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z);
0031 extern void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z);
0032 
0033 inline void fprint (std::ostream& stream, const cl_N& x)
0034 {
0035     extern cl_print_flags default_print_flags;
0036     print_complex(stream,default_print_flags,x);
0037 }
0038 
0039 CL_DEFINE_PRINT_OPERATOR(cl_N)
0040 
0041 }  // namespace cln
0042 
0043 #endif /* _CL_COMPLEX_IO_H */