Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Unit number / standard output

velvia
Beginner
615 Views
Hi,
Does the standard output has a unit number ? I want to be able to write a type-bound procedure which looks like
subroutine writeDescription(theUnit)
integer, intent(in) :: theUnit
write (theUnit, *) 'My description'
end subroutine
and I want to call something like myObject%writeDescription(*).
What can I do ?
Francois
0 Kudos
1 Reply
Steven_L_Intel1
Employee
615 Views
The standard way to do this is to use the named constant OUTPUT_UNIT from intrinsic module ISO_FORTRAN_ENV. For example:

[fortran]use, intrinsic :: iso_fortran_env
write (OUTPUT_UNIT,*) 'My description'[/fortran]
You can't pass * as an argument, but you could pass OUTPUT_UNIT if you wished.
0 Kudos
Reply