comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Free source code diagramming programs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Free source code diagramming programs [message #48345 is a reply to message #48304] Thu, 13 April 2006 17:20 Go to previous messageGo to previous message
idlwizard-1@yahoo.com is currently offline  idlwizard-1@yahoo.com
Messages: 11
Registered: December 2005
Junior Member
> Pretty printers (auto-indentation, etc.) lose a lot of information...
> and tend to mess up comments,
> especially when the author carefully lined up the columns of his/her
> comments or code in some sort of table.

Could you elaborate on this? What information is lost by reformatting?

Here is an example from a FORTRAN calculator program, which will also
only line up right if you display in a fixed width font like Courier:

! Problems
if((a.eq.'/' .and. y.eq.0).or. ! Divide by 0
& (a.eq.'1/'.and. y.eq.0).or. ! reciprocal of 0
& (a.eq.'^' .and.(y.lt.0 ! Negatives to
negative power
& .or.(x.eq.0.and.y.eq.0))) then ! Zero to zero power

If you only know IDL,
; Problems
if (a eq '/' and y eq 0) or $ ; Divide by 0
(a eq '1/' and y eq 0) or $ ; reciprocal of 0
(a eq '^' and (y lt 0 $ ; Negatives to
negative power
or (x eq 0 and y eq 0)) then begin ; Zero to zero
power

If you only know C,
/* Problems */
if((strcmp(a,'/' )==0 && y==0) || /* Divide by 0 */
(strcmp(a,'1/')==0 && y==0) || /* reciprocal of 0 */
(strcmp(a,'^' )==0 && (y==0 /* Negatives to negative
power */
|| (x==0 && y==0))) { /* Zero to zero power */

No pretty printer is gonna preserve that.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Finding a value in a array efficiently
Next Topic: ENVI Vector File with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:07:00 PDT 2025

Total time taken to generate the page: 0.00453 seconds