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.

27 lines
822 B

25 years ago
  1. // I/O of lfloats.
  2. #ifndef _CL_LFLOAT_IO_H
  3. #define _CL_LFLOAT_IO_H
  4. #include "cl_number_io.h"
  5. #include "cl_lfloat.h"
  6. inline cl_istream operator>> (cl_istream stream, cl_LF& result)
  7. {
  8. extern cl_read_flags cl_LF_read_flags;
  9. extern const cl_F read_float (cl_istream, const cl_read_flags&);
  10. result = As(cl_LF)(read_float(stream,cl_LF_read_flags));
  11. return stream;
  12. }
  13. // The following does strictly the same as the general `fprint' for floats.
  14. // It is here only so that people don't need to include <cl_float_io.h>.
  15. inline void fprint (cl_ostream stream, const cl_LF& x)
  16. {
  17. extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
  18. extern cl_print_flags cl_default_print_flags;
  19. print_float(stream,cl_default_print_flags,x);
  20. }
  21. CL_DEFINE_PRINT_OPERATOR(cl_LF)
  22. #endif /* _CL_LFLOAT_IO_H */