[fpc-pascal] Read lines into UnicodeString variable from UCS2 (UTF-16) encoded text file

Michael Van Canneyt michael at freepascal.org
Mon Sep 16 08:52:59 CEST 2019



On Sun, 15 Sep 2019, DougC wrote:

> In my view that's exactly what a procedure is for: Accept some parameters, do some processing, store some data elsewhere, return some results via parameters.
>
> Functions, on the other hand, should be more limited. Accept some data, perform one function, return one result, having no side effects.

Original point of view :-)

I really don't see why functions and procedures are supposed to behave
different. That a function returns a result is simply a convenience as it
saves a variable and in this sense I lean towards using functions for
everyhing. If we only had functions that would be fine too.


Michael.


More information about the fpc-pascal mailing list