Użytkownik Tomas Hajny napisał:
On Wed, 22 Sep 2004 13:32:27 +0200, Darek Mazur wrote

Użytkownik Tomas Hajny napisał:

On Wed, 22 Sep 2004 11:51:06 +0200, Darek Mazur wrote


Użytkownik Tomas Hajny napisał:


From:                   Darek Mazur <[EMAIL PROTECTED]>
Date sent:              Thu, 16 Sep 2004 16:52:54 +0200

. .

A new procedure SetTextLineEnding (var T: text; S: string) was added to System unit in CVS. This allows you to change line ending for

. .

But is function like
  GetTextLineEnding(vat T: text): string

. .

Such a function can be added, of course, but keep in mind that it will only
return the value you assigned to it yourself (as already mentioned by
Vincent). Don't expect that it would be able to determine the used line ending
type in existing files while reading them - this is not possible (among other
reasons, you are never guaranteed to have uniform line endings throughout the
whole existing file).

Of course, I don't expect test of format of file. I think, this function is need when pass T:text to other function


Why do you think this function is needed (sample scenario)?

I only imagine (sorry for my english), when I set something that sometimes I must read what I set. For me T: text is like object, which I pass to function,
this function maybe need to know, how Lineending is set (I think about special or internal function). Its not correct pass to this function LineEnding separately. I think that every kind of information about T:text should be set and get through function/procedures not direct from fields of record.


I can't now give an exact program, but this kind of function don't make any disorder or other bad things.


Darek





Tomas


_______________________________________________ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel

.



_______________________________________________
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to