- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
write(*,300)count,SUMDW1,floor(STRNS),CGT,YB-CGT,CGTLMT
the third element of the write statement prints as 0.00 instead of 30.00. STRNS has a value of 30.9
If I pull it out and set a variable first it prints as normal. Is this expected?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will have to show the 300 FORMAT statement to make sense out of the behavior.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
300 Format(" ",i2," ",F6.0," ",F3.0," ",F6.2," ",F6.2," ",F6.2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Floor function returns an integer, I should have checked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. So either change F3.0 to I3 or use
write(*,300)count,SUMDW1,real(floor(STRNS)),CGT,YB-CGT,CGTLMT
Jim Dempsey

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