File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -243,25 +243,25 @@ to `unit`.
243
243
``` fortran
244
244
program demo_add_log_unit
245
245
use stdlib_logger, only: global_logger, read_only_error
246
- ...
246
+
247
247
character(256) :: iomsg
248
248
integer :: iostat, unit, stat
249
- ...
249
+
250
250
open( newunit=unit, 'error_log.txt', &
251
251
form='formatted', status='replace', &
252
252
position='rewind', err=999, &
253
253
action='read', iostat=iostat, iomsg=iomsg )
254
- ...
254
+
255
255
call global_logger % add_log_unit( unit, stat )
256
256
select case ( stat )
257
- ...
257
+
258
258
case ( read_only_error )
259
259
error stop 'Unable to write to "error_log.txt".'
260
- ...
260
+
261
261
end select
262
- ...
262
+
263
263
999 error stop 'Unable to open "error_log.txt".
264
- ...
264
+
265
265
end program demo_add_log_unit
266
266
```
267
267
You can’t perform that action at this time.
0 commit comments