Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29280 Discussions

Header control in Visual Studio printed output?

dboggs
New Contributor I
2,401 Views

I use the VS shell and frequently print a portion of my code for study, review, markup, etc. There is a header on each page giving the file source and page number. I would like it to also include the date. Is this possible? I have searched and searched but cannot find. Seems like a terrible limitation for a sophisticated program.

0 Kudos
12 Replies
Steven_L_Intel1
Employee
2,401 Views

I don't see any way to do this in Visual Studio. A quick Google search did not reveal any obvious add-ons that do this either.

0 Kudos
bmchenry
New Contributor II
2,401 Views

RECOMMENDED TOOL: I use and recommend TextPad, a very powerful yet very simple replacement for Notepad. http://www.textpad.com

It has 'document class' capabilities for all different types of programs http://www.textpad.com/add-ons/syna2g.htm which inlcudes fortran, it's shareware and only $29 or so to license, and you can print color w and w/o line numbers, etc, etc

(and i am NOT in any way connected to Textpad (think they're British?) but have used them for over a decade and so have never had to use the print function from the VS shell (once you print from a directory you can set it to always stay in that directory so great for when working on a project and opening/printing multiple files)

Brian

 

0 Kudos
dboggs
New Contributor I
2,401 Views

Thanks Brian.

I am quite familiar with Textpad, use it a lot, and used it exclusively when programming in old, old DOS Fortran. I agree that it is a very good editor with additional niceties. But now, having gotten used to the VS IDE, it is extremely convient to print using that as well. There are actually some things I like better in VS than in TP. And vice-versa of course. I would consider it a small inconvenience, when developing in the VS environment, to jump to another editor just for printing.

But I'm glad you responded to my complaint. I just found it hard to believe that something as fundamental and useful as the date could be missing from a header with no chance of adding it. I had hoped that I was just not able to find the right tweaking switch.

0 Kudos
bmchenry
New Contributor II
2,401 Views

the only thing i use Textpad for when developing programs in VS is for printing source files, etc. The editor in VS is fine, just the print utility is clumsy and doesn't purdify the output like Textpad can and does. The Textpad Fortran (and C++) color coded source code listings and all the options, etc work great.

I'm with you that the print utility is deficient in VS. It would be nice if INTEL (or would it be Microsoft?) hired TextPad to create a simple plug-in (hint hint! since it's only $29 per license commercial, i expect bulk licensing would be much less!! hint hint and/or the cost to develop as robust and convenient a source code printing utility as Textpad will take time and effort on the part of INTEL (or would it be Microsoft?)

 

0 Kudos
andrew_4619
Honored Contributor III
2,401 Views

This doesn't help your debate but this topic made me think when was the last time I printed any source code. I am thinking more than 20 years ago... Any then I asked myself why I stopped ( I used to print source all the time) and the answers I came up with were:

1) The source codes were voluminous and took up too much space on my desk and quickly headed for the waste bin.

2) All or part of the print was out of date very quickly, the stuff on my screen is always up to date.

3) Working is VS you can find things much quicker using the numerous search options. Free-form, indentation, syntax highlighting have all improved the on screen experience, you can see things much clearer and screens have got bigger.

4) Printing is expensive and wasteful.

As a general question do many people print out much these days?

 

0 Kudos
Steven_L_Intel1
Employee
2,401 Views

We have no control over this aspect of VS, and considering that Microsoft has removed features such as color printing, I doubt they would place much priority on such a request.

We DO have the option to generate a listing file, and if you print that you'll have dates and much more.

0 Kudos
rase
New Contributor I
2,401 Views

Do many people print out much these days? Yes, sometimes I print out source programs, for a simple reason: I find it more convenient to work sitting comfortably at a table, with a cup of tea or coffee (fluids of any kind are strictly forbidden in the neighborhood of a keyboard an other electronic devices), checking the program flow and the algorithms, making notes and additions on paper with a pencil, and examining the notes and changes before I finally edit the source code. It is a good habit to take time and rethink decisions before making them final. Unfortunately Windows does not support versioning of files, a feature I loved in the old DEC VAX/VMS, which made it easier to return to an older but correct version of a program.

0 Kudos
Steven_L_Intel1
Employee
2,402 Views

rase, there are several varieties of source control systems that can be integrated with Visual Studio to allow you to see older versions. Actually, Windows does support a limited ability to restore old versions if you have restore points or use Windows Backup. At home I use two different backup services, one an incremental backup to Network Attached Storage and the other a cloud backup (Carbonite). Each of these allows me to view and retrieve older versions without difficulty.

I think the Intel Fortran listing file, which is very close to what the DEC compiler offered (including cross reference!), is a better bet than printing from within Visual Studio, though you don't get color.

0 Kudos
dboggs
New Contributor I
2,402 Views

Although I never print a complete code just for the record, I do find it convenient to print a single small procedure, or a fragment of a larger procedure. Largely for all the reasons rase mentioned. In short, it provides an opportunity to unglue myself from the computer screen and take up a problem issue in another environment. Also, it allows me to easily markup the code with notes, sketches, pseudocode, etc. in ways that just don't work at the computer. This points out one problem with using the Intel listing file: it would usually produce much more than I want.

0 Kudos
Steven_L_Intel1
Employee
2,402 Views

So create the listing file, open it in notepad, select the part you want and print the selection.

0 Kudos
dboggs
New Contributor I
2,402 Views

Yes that would work, but it's not very handy. It would be easier to open the source .f90 file using Textpad and print from there, as suggested earlier. I was hoping for something more convenient. I think the conclusion is in.

0 Kudos
rase
New Contributor I
2,402 Views

"There are several varieties of source control systems that can be integrated with Visual Studio to allow you to see older versions." Thanks for the hint, Steve. I will take a try.

0 Kudos
Reply