Software Archive
Read-only legacy content
17061 Discussions

Line numbers in Fortran

Intel_C_Intel
Employee
866 Views
How do you get Compaq Visual Fortran to print out line numbers with the source code? Also, is there a way to see the line numbers in the source code window? When we change the source code we are required to specify the changed line numbers in a revision history comment section. I need to have the line numbers in a print out in order to add this information. Thanks.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
866 Views
Just ask for a source listing (Project..Settings..Fortran..Listing Files.) There isn't a way to add source line numbers to the editing window, but the current line number is displayed at the bottom of the pane and you can use CTRL-G to GOTO LINE.

Steve
0 Kudos
Intel_C_Intel
Employee
866 Views
I tried it still no line numbers in the print out, more advice please.
0 Kudos
Steven_L_Intel1
Employee
866 Views
Works for me. You need to check the Source Listing box - the listing file has the .lst type. Here's an excerpt of an example:

	      1 module mymod
	      2 interface operator (//)
	      3  module procedure myconcat
	      4  end interface operator (//)
	      5 contains
	      6 function myconcat (arg1, arg2)
	      7 character*(*), intent(in) :: arg1
	      8 integer, intent(in) :: arg2
	      9 character*(LEN(arg1)+ 1) myconcat
	     10 myconcat = arg1 // char(arg2+ichar('0'))
	     11 return
	     12 end function myconcat


Steve
0 Kudos
Reply