Source Code Formatter for AVRco Pascal

need a little help

  • 1
  • 2
  • 3
  • Page 3 of 3
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 07.05.2013 - 10:28  ·  #17
Hello Louis.

If I understand correctly you would like the formatter to automatically trace through to '.inc' files. There are no plans to do this.

I did consider it, and a similar idea for projects, uses clauses and so on, but decided that there were as many disadvantages as advantages, and it was not worth the effort.

The most important advantage of this would be to have consistent capitalisation across source files, but I realised that this was a double edged sword, because two projects sharing a file could fight each other. Therefore I created 'capitalisation' files to overcome this problem. any project can include a list of captitalisations to use that can be edited inside the editor and can be imported into different projects, but this has not been tested fully yet.

Sorry.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 07.05.2013 - 17:52  ·  #18
Hello Merlin,

an Include file has nothing different compared to a standard PAS file. The same rules can apply there.
My opinion...

rolf
Lschreyer
Schreiberling
Avatar
Gender: n/a
Posts: 526
Registered: 02 / 2007
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 08.05.2013 - 10:43  ·  #19
The old optimizer handled .inc files like .pas files.
When I hit the "Sun"-Button it optimized the inc-file, with some failures in strings for lcd-displays, But that is an other topic.

Louis
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 08.05.2013 - 11:56  ·  #20
First of all, sorry, I misunderstood the original German. I thought that you were asking for the inc files to be automatically formatted when formatting was requested on a file that has a {$INC...} line.

Yes, inc file should be same as pas file, but there will be issues. The main problem is that there are (potentially) no sections. The formatter allows different parts of the program to be formatted differently, and fundamentally the formatter does not know which area it is in.

I need to change the rules database to make some assumptions for sensible inc files, so if you provide me with a sample inc file that you expect to be formatted correctly I will make the changes.

Of course, with inc files it is possible to fool any formatter. For example, if you had a set of standard inc files that set up parts of the defines section, I would have no way of knowing that I was in the defines section and format appropriately. It may be possible to overcome this by a special directive to the formatter if you think that it is worth it, but I think that the sensible way, if it does not know which section it is in to behave as if it is the implementation section.

So, if you could send me via pm a suitable INC file for me to test with, I will make the changes. One that has the problems with the lcd strings would be good.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 08.05.2013 - 12:27  ·  #21
Hello Merlin,

I have 7 very different INC files I can send you.

rolf
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 08.05.2013 - 12:36  ·  #22
Thanks Rolf. I look forward to getting them, but I would still like a file from Louis as well.
Lschreyer
Schreiberling
Avatar
Gender: n/a
Posts: 526
Registered: 02 / 2007
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 15.05.2013 - 08:29  ·  #23
Hello,

I will send you some soon.

Louis
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1373
Registered: 03 / 2005
Subject:

Re: Source Code Formatter for AVRco Pascal

 · 
Posted: 22.05.2013 - 09:46  ·  #24
Hi Louis.

You have mail ;-)
  • 1
  • 2
  • 3
  • Page 3 of 3
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   137   151 · Page-Gen-Time: 0.026103s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI