Loading ...
Sorry, an error occurred while loading the content.

1029Re: [jasspa] More indent questions

Expand Messages
  • Jeremy Cowgar
    Feb 19, 2004
    • 0 Attachment
      Quoting Jon Green <jnaught@...>:
      > I think you could use Steves new "x" and "t" modes
      > and run multiple indent schemes. This would then allow
      > you to drop out following a ';'. These are very
      > new so nobody has really used then outside of
      > inserting alternate schemes, but I think they could
      > also be applicable in this case.
      >
      > See "hkxml.emf" and be a pioneer ! If you get
      > it to work then post back the answer - would
      > be interested to see how you applied it.

      Hum. The problem I see with that is much duplication, for instance:

      if a = 1 then
      ..begin
      ....if b = 1 then
      ......say('a=1,b=1');
      ....else
      .....begin
      ......for c = 1 to 10 do
      ........begin
      ..........say('I''m running out of ideas of things to say');
      ..........if c = 5 then
      ............say('c = 5, we are half way done');
      ........end;
      .....end;
      ..end;

      I originally thought, ok... when we hit a begin, we will enter a diff mode,
      but that's not making sense either. We can't hit another mode once we go
      into an if either because the same problem exists with many different
      constructs, do, while, for, if, case, procedure, function, etc...

      Here's another one:

      const
      ..a = 10;

      var
      ..name : string;
      ..age : integer;

      begin
      ..do_something();
      end;


      the const/var I could see being a diff indent... a blank line indents -2,
      but then again, you can have something like:

      type
      ..a = array[1..10] of integer;
      ..TObj = object
      ....public
      ......procedure SayHi();
      ....private
      ......whats_up();
      ....end;

      it's rather complex, but that would need a indent -2 on a blank line also.
      Maybe it's just too complex to work in the indent scheme.

      Jeremy
    • Show all 11 messages in this topic