当前位置: 动力学知识库 > 问答 > 编程问答 >

Print formatted source from Delphi 2010 IDE

问题描述:

How to print formatted Delphi source on a printer?

网友答案:

As suggested, here is my comment as an answer:

To print formatted source code from the Delphi IDE:

  • Open the source file in IDE,
  • format it (manually or using Ctrl-D in D2010+),
  • print it (File|Print)
网友答案:

Once, when I had to take over a legacy red-headed stepchild project that had always gotten the left over efforts of programmers ordered to work on it, I did a lot of analysis of the code flow and logic using Microsoft Word. I copied the code out of the environment (it was in VB, but the same thing would work in Delphi), pasted it into Word in a mono-spaced type and added comments using text boxes, etc. In the comments, I could condense some obscure sequences into pseudo-code or summarize the requirements and effects of code blocks or do anything else that made the code more understandable to me. There were a few times when I needed to discuss the code with others and at that point I could email or sometimes even print my attempts at making sense from some pretty unruly code.

Although this is a reason why I might print some code, I would probably not do it directly from the IDE.

网友答案:

If you want to do this from your own software, you can use SynEdit.

It highlights code in a TMemo-like component, and you can print that. It's free and doesn't require external dll's or anything.

http://sourceforge.net/projects/synedit/

分享给朋友:
您可能感兴趣的文章:
随机阅读: