- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recently I have tried to use "block/end block". But I found a error when I wrote some data as follow
then, the fortran compiler return an internal error:
fortcom: Fatal: There has been an internal compiler error (C0000005).
while if I don't use block or replace "<i>I8" by 1I8, no error reported.
The fortran compiler is Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.5.281 Build 20190815 with a student license.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ICE is a compiler bug always but your code is not standard Fortran, the <i> syntax is an extension supported by some compilers. You should not use that '(*(i8))' would be any number or you could build a format at run time.
character(20) :: gf, gtmp
integer :: i
i = 2
write(gtmp,'(i0)' ) i
gf = '('//trim(gtmp)//'(i8))'
write(*,gf) i
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ICE is a compiler bug always but your code is not standard Fortran, the <i> syntax is an extension supported by some compilers. You should not use that '(*(i8))' would be any number or you could build a format at run time.
character(20) :: gf, gtmp
integer :: i
i = 2
write(gtmp,'(i0)' ) i
gf = '('//trim(gtmp)//'(i8))'
write(*,gf) i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Think you so much! It is better and common way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want the format to be repeated as many times as there are items or elements, then use the format:
'(*(i8))'
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page