[fpc-devel] ptop inconsistent with defaults config file specified
Michael Van Canneyt
michael.vancanneyt at wisa.be
Mon Mar 19 14:23:09 CET 2007
On Mon, 19 Mar 2007, Graeme Geldenhuys wrote:
> Hi,
>
> I saved the default settings of 'ptop' to a file using the following
>
> ptop -g ptop.cfg
>
> Now using that config file with the -c parameter and not specifying it
> at all should give me the same results, but it does! Anybody that can
> shed some light on this. I'm in the process of creating a Borland
> Object Pascal coding standards config file and came across this
> stumbling block.
>
> Here is how I used the ptop application with the defaults and defaults
> generated config file:
>
> 1) ptop test3.pp test3_out.pp
> 2) ptop -c ptop.cfg test3.pp test3_out.pp
>
>
> Here is the content of the test3.pp file
>
> -------------------[ test3.pp ]--------------------------
> procedure TestTryProc;
> begin
>
> try ShowMessage ('Start'); try ShowMessage ('trying');
> try ShowMessage ('still trying');
> finally ShowMessage ('going...'); end;
> except ShowMessage ('except'); end;
> finally ShowMessage ('Finally!'); end;
>
> end;
> -------------------[ end ]--------------------------
>
>
> Here is the output of 1) above. Notice the difference in indentation
> of the try/finally and try/except blocks in 1) and 2).
I don't have much time at the moment, and it has been a long time since I
looked at the ptopu unit. The unit was originally intended for TP code,
and try/finally/end did not exist back then. The support I added for this
was a quick hack. I'm sorry to say that at the moment I don't have time to
look at the config file problem, so you'll have to do some testing :/
If you mail me in private, I can try to help.
Michael.
More information about the fpc-devel
mailing list