Menu

indent adjustment in multi-line expressions

2004-08-30
2004-09-01
  • Nobody/Anonymous

    Maybe I'm merely unaware of the correct configuration option, but I can't figure out how to stop JCF messing with extra indenting inserted to communicate logical groupings. in a multi-line expression

    eg. how to prevent the reformatting of

      argument := Copy(Argument,
                               Pos(Argument,
                                     'My token'),
                               Length(Argument));

    to

      argument := Copy(Argument,
        Pos(Argument,
        'My token'),
        Length(Argument));

    Thanks

    Richard Lang

     
    • Nobody/Anonymous

      Aaargh, my posting had "unnecessary white-space" stripped out, renderint it meaningless

      Trying again with underscores to represent the whitespace....

      eg. how to prevent the reformatting of

      __argument := Copy(Argument,
      __________________Pos(Argument,
      ______________________'My token'),
      __________________Length(Argument));

      to

      __argument := Copy(Argument,
      ____Pos(Argument,
      ____'My token'),
      ____Length(Argument));

       
    • Anthony Steele

      Anthony Steele - 2004-08-31

      This should happen. The trailing lines should be indented to 2 spaces below the first line by default. Check your settings on the "indentation" page.

       
    • Anthony Steele

      Anthony Steele - 2004-09-01

      The Borland standard (http://community.borland.com/article/0,1410,10280,00.html) is to always indent trailing lines by 2 spaces. For the reasons why this is a good idea, see the discussion on this topic in Steve McConnell's book "Code Complete".

      However we are not totally prescriptive here. Alternative styles can be included as an option, if you want to code it up.

      PS: my mail to you bounced. I have added a comment to your feature request.

       

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.