[fpc-devel] ptop

Jan Ruzicka jan.ruzicka at comcast.net
Tue Feb 22 06:30:31 CET 2005


On Feb 21, 2005, at 04:03, Michael.VanCanneyt at Wisa.be wrote:

> On Mon, 21 Feb 2005, Jan Ruzicka wrote:
>
>> Hi
>>
[... snip ...]
>> only outstanding issue are new lines in front of long comments.
>> The procedure PPSymbol is trying to fit the symbol on a line by  
>> inserting a
>> new line.
>>
>> This is working so it can be checked in.
>
> Applied the patch, checked in.
>
> Michael.
Thank you Michael.

Now to the multiline comment problem.

Should the comment be interpreted:

a)  whole as one symbol?
Meaning as group of characters between comment symbols including a new  
line.
symbol = '{l1\nl2\nl3\n}'

or

b) series of commented lines?

Meaning as group of symbols characters between comment symbols  
including a new line.
symbol1 = '{l1'
symbol2 = 'l2'
symbol2 = 'l3'
symbol2 = '}'

I am asking because the current implementation is the variant a), which  
causes problems with the PPsymbol procedure.
(Inserting empty line in front of comments longer then 'currmargin')
------------------------------------------------------------------------ 
-----------
Another question is
What do you think about the global variable sets?
 From reading code I think that it contains set of settings for current  
symbol.
As such it should be moved to currsym structure.

If nothing else it should move at least to the TPrettyPrinter object,
as it is set in TPrettyPrinter.PrettyPrint according to its options.
This means multiple TPrettyPrinter instances would fight over the sets
variable.
------------------------------------------------------------------------ 
-----------
Where could be a good place to create unit test programs for the utils ?


Thanks once more for the check-in.

Jan Ruzicka





More information about the fpc-devel mailing list