- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a function with the following interface:
If I want to pass 1.0E30 for value, e.g.
I get an error that data types are inconsistent.
Is there a way to declare the 1.0E30 as double without using dble or real(val, 8)?
If so, does that work for other numeric data types as well?
Thanks in advance
FObermaier
I have a function with the following interface:
[plain]integer(4), parameter :: real_kind = 8
subroutine SetZWidS( linkIndex, segmentIndex, value ) integer(4), intent(in) :: linkIndex, segmentIndex real(real_kind), intent(in) :: value ... end subroutine [/plain]
If I want to pass 1.0E30 for value, e.g.
[cpp]call SetZWidS(link, segement, 1.0E30),[/cpp]
I get an error that data types are inconsistent.
Is there a way to declare the 1.0E30 as double without using dble or real(val, 8)?
If so, does that work for other numeric data types as well?
Thanks in advance
FObermaier
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use 1.0e30_8 or 1.0e30_real_kind if real_kind is visible in the calling routine (advisable)
Les
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use 1.0e30_8 or 1.0e30_real_kind if real_kind is visible in the calling routine (advisable)
Les
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page