Author Topic: Delphi  (Read 5131 times)

dunkers

  • Senior Community Member
  • Posts: 778
  • Hero Points: 36
Delphi
« on: May 20, 2009, 07:51:01 PM »
Once upon a time SE supported Delphi just as well as it supported C++, but a few versions ago that seems to have hit the bit bucket. Any particular reason for that? I used to use SE to edit pascal code then switch to the Delphi IDE just to compile it. I'm disappointed that there is no compiler or even language support.

Anyway, I just happen to have been lumbered a huge amount of some really awful Delphi code, so any port in a storm is the order of the day. Unfortunately, the SE tagging seems to be a bit suspect - when showing the definition for a procedure in the preview window (or jumping to the definition via the context menu) the line chosen as destination is actually half a dozen after the line which has 'procedure xxx'. That is, about halfway through the 'var' section for most of them.

dunkers

  • Senior Community Member
  • Posts: 778
  • Hero Points: 36
Re: Delphi
« Reply #1 on: June 01, 2009, 05:18:01 PM »
Investigation shows the context tagging is fine: even Bor^H^H^HCodeg^Wthe Delphi IDE authors have the same problem with the same line offset. I have no idea what the chap has done to this file but to make it do this yet still compile and run is quite clever. Pity about the 500+ warnings...

MichaelBate

  • Community Member
  • Posts: 29
  • Hero Points: 0
Re: Delphi
« Reply #2 on: June 03, 2009, 09:51:19 PM »
I also do a great deal of programming in Delphi (though recently I have been using C#).  Like C#, Delphi has the power of C++ without the ugliness - and also without requiring your users to install .NET.

I see that Pascal is a supported language in SE 2009, and it seems to work for me.

dunkers

  • Senior Community Member
  • Posts: 778
  • Hero Points: 36
Re: Delphi
« Reply #3 on: June 04, 2009, 12:59:37 AM »
It's not bad once you're going and have decent source, indeed. The lack of a Pascal/Delphi option in the project wizard, and not even a hint that you could create a Delphi tag file, is what confused me.

Dennis

  • Senior Community Member
  • Posts: 3996
  • Hero Points: 521
Re: Delphi
« Reply #4 on: June 04, 2009, 08:49:08 PM »
The original issue with line counts being off may be due to inconsistent line ending characters in the source file in question.  If you have some DOS line endings mixed in with a file that is mostly Mac or Unix line endings, you will have some lines that will get counted once by tagging, but as two lines by the editor.

dunkers

  • Senior Community Member
  • Posts: 778
  • Hero Points: 36
Re: Delphi
« Reply #5 on: June 04, 2009, 09:25:30 PM »
Well spotted, Dennis - there was a mix of LF and CRLF endings, with DOS style slightly outnumbering the others.

Another issue was that SE lost track of comment nesting and saw the last half of the file as just comment. Naturally, Delphi saw it as code but that's not to say the comments were correctly nested, just that it worked in Delphi. I removed 4000 lines of rubbish and SE was much happier :)