- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There doesn't appear to be a converse to QEXT. Is there a workaround? Would x(REAL(8)) = y(REAL(16)) work?
Thanks,
Gerry T.
Thanks,
Gerry T.
링크가 복사됨
3 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
You want to convert a REAL(16) to a REAL(8)? You can just do the assignment or, and this works for any conversion, use REAL(x,8) to convert x, no matter what numeric type it is, to REAL(8).
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
That's great. I'd forgotten about the REAL function.
Thanks,
Gerry T.
Thanks,
Gerry T.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I would recommend using the REAL, INT and CMPLX functions with their KIND specifiers in new code - it is standard and less confusing. Of course, for portability, you'd want to combine this with a set of PARAMETER constants that specify the kind values using SELECTED_REAL_KIND, etc.