Menu

Formatting the program

archie456
2008-01-02
2012-09-26
  • archie456

    archie456 - 2008-01-02

    Hi,

    Appologies if there is an obvious answer to this question - I'm a bit of a newbe.

    Is there any way to get Dev C++ to automatically format the program in the window - i.e. to make it visually look as it should with loops and if's nested etc.

    I can't seem to do this and it make the program I have written difficult to read.

    I've use a LISP development enviornment and on that there is a button which the user presses to have the whole progamme formatted properly.

    Thanks.

     
    • cpns

      cpns - 2008-01-03

      Kurgusov, I think you are worrying about his motives too much. If you have ever coded in a team, or used open source code, or code posted to this forum, then these and many more are reasons for wanting code formatting.

      Maybe his TAB key is just broken. ;-)

       
    • Kurgusov

      Kurgusov - 2008-01-02

      Are you asking if dev-cpp can make your code look better,
      wtf are you asking ?

       
    • cpns

      cpns - 2008-01-02

      It won't reformat the code for you. You need to type it formatted! There are some auto-indent options to assist (or hinder depending on your point of view).

      When attempting to make sense of unformatted code posted to this forum, I use VC++ 2005 Express Edition which does that with ctrl-k crtl+f. Of course once you have downloaded an installed that you may be asking yourself what you need Dev-C++ for in the first place! ;-)

       
    • archie456

      archie456 - 2008-01-02

      Thanks cpns - I'll give VC++ a try (is it free??).

       
    • BiT

      BiT - 2008-01-02

      yes it is free

       
    • Kurgusov

      Kurgusov - 2008-01-03

      I'm sorry for posting here again with a bad attitude.

      But I have to ask, why would you need a program to format your code ?
      Is it so you can view code posted at this forum, if so then I completly understand.

      But if its so you can understand you own code,
      well thats just f***ed.

      You must know how to indent your loops, one loop equals one tab,
      sounds stupid 'cause I can't demonstrate in this post.

      int num[3] ;

      for (int i=0; i < 4; i++){
      ....num [i] = i ;
      }
      ....for (int i=0; i < 4; i++){
      ........num [i] = i+1 ;
      ....}

      etc.

      someone needs to allow for code tags in this forum to make life easier, no ?

       
    • Kurgusov

      Kurgusov - 2008-01-03

      well there I go again,
      exceeding the boundries of the array,
      I must truly suck.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.