From: Gary L. Scott on
mitch grunes wrote:
>>Well yeah, but it's a lot of
>>hard work to trace over
>>3914 lines of useless Usenet post...
>
>
> OK, next time I'll limit the source code to alt.sources, or maybe find
> another free web hoster that lets me store source code files.
>
> Didn't occur to me that some Usenet reading programs make you read
> everything.
>
> As to the Ben Pfaff, who prefered identation, I do that on my own code.
> It's good enough for short programs, if I make no mistakes.
>
> But the next time someone hands you a 20000 or so line legacy program
> developed by 200 people over 30 years, that no one alive understands,
> you may appreciate whatever help you can get. There is a lot of code
> out there like that. The definition of a professional is that you do
> what you are payed to do.
>
> Brooks Moses's idea of coloring indentation stuff to make it more clear
> sounds neat. But a lot of work - I was trying to stay away from
> postscript.
>
On windows, color would be quite easy using an RTF edit box. You can
then output the RTF content to disk. RTF is widely supported as an
import format to most word processors on other platforms and it remains
editable. Postscript is a printer data stream. It shouldn't be used as
a document interchange format. I would think that it would be
desireable for this output to remain editable so that you can import it
into presentations or other documents and tweak it (fonts, spacing, etc).

--

Gary Scott
mailto:garyscott(a)ev1.net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

Why are there two? God only knows.


If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford
From: Gary L. Scott on
Edward Gregor wrote:

> slebetman(a)yahoo.com wrote:
>
>> idlwizard-1(a)yahoo.com wrote:
>>
>>> The latest revision of my source code diagramming programs are
>>> available at
>>>
>>> http://www.geocities.com/grunes/diagram.html
>>>
>>> These programs diagram source code in the following languages:
>>>
>>> C and C++<br>
>>> FORTRAN<br>
>>> HTML (very incomplete)<br>
>>> IDL, PV-WAVE, GDL and FL
>>>
>>> They do things like draw lines showing the start and end of routines
>>> and blocks, put * next to jumps, and = next to commented out sections,
>>> and can warn you of certain classes of error.
>>>
>>> They can help you find problems in your own code, or help you look at
>>> long complicated legacy code other people give you.
>>>
>>> The programs themselves are in FORTRAN. I know that is a problem for
>>> users of other programming languages, but it is freely available as g77
>>> or g95 under Cygwin (under Windows) or Linux, and is available on many
>>> other platforms.
>>
>>
>> Well... my favourite text editor already does what your program do and
>> does it live while I'm editing code. On top of that it also
>> *highlights* the relevant line when the cursor is on either the opening
>> or closing brace {}. On top of that it does syntax highlighting. On top
>> of that it also allows me to fold sections of code to temporarily hide
>> things I'm not interested in (and remember this is "live" while I'm
>> editing). And to top it all off it can print, save as RTF save as PDF
>> and save as HTML the nicely formatted code along with the nice lines.
>> The only difference is that my editor draws lines based on indentation
>> while your program auto-indent and draws lines based on braces. But
>> that's OK, that's what "indent" is for. Oh and yes my editor supports
>> syntax of more than 40 different languages including C/C++, Tcl,
>> Fortan, Forth, VB, Perl...
>>
>
> May I ask which editor you are using?

Most decent editors do most of this.

--

Gary Scott
mailto:garyscott(a)ev1.net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

Why are there two? God only knows.


If you want to do the impossible, don't hire an expert because he knows
it can't be done.

-- Henry Ford
From: Ben Pfaff on
"mitch grunes" <idlwizard-1(a)yahoo.com> writes:

> As to the Ben Pfaff, who prefered identation, I do that on my own code.
> It's good enough for short programs, if I make no mistakes.
>
> But the next time someone hands you a 20000 or so line legacy program
> developed by 200 people over 30 years, that no one alive understands,
> you may appreciate whatever help you can get. There is a lot of code
> out there like that. The definition of a professional is that you do
> what you are payed to do.

But wouldn't be better to run the code through a tool that can
properly indent it, in that case? Then you can work on readable
code, as opposed to just being able to refer to a version that is
slightly easier to read.
--
"It would be a much better example of undefined behavior
if the behavior were undefined."
--Michael Rubenstein
From: Paul M. Dubuc on
Ben Pfaff wrote:

> But wouldn't be better to run the code through a tool that can
> properly indent it, in that case? Then you can work on readable
> code, as opposed to just being able to refer to a version that is
> slightly easier to read.

http://www.faqs.org/docs/Linux-HOWTO/C-C++Beautifier-HOWTO.html

--
Paul M. Dubuc
From: Ben Pfaff on
"Paul M. Dubuc" <pdubuc(a)cas.org> writes:

> Ben Pfaff wrote:
>
>> But wouldn't be better to run the code through a tool that can
>> properly indent it, in that case? Then you can work on readable
>> code, as opposed to just being able to refer to a version that is
>> slightly easier to read.
>
> http://www.faqs.org/docs/Linux-HOWTO/C-C++Beautifier-HOWTO.html

I don't think anyone has trouble finding a beautifier. If that's
not all you meant to say, then perhaps you should be more
explicit.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}