[fpc-pascal] Blockread blockwrite var vs out parameters

Santiago A. svaa at ciberpiula.net
Wed Dec 16 11:45:43 CET 2015


In functions blockread and blockwrite, the result parameter is "var".
And in blockread buffer is also "var".

Couldn't they be marked as "out" instead of "var"?.
It's not an aesthetic or academic change,  I would save a lot of  "not
initialized" warnings that flood the message window.

Of course I could use compiler directives to remove that warning, or
initialize the actual parameter. But why should we waste time setting a
dummy value that, in fact, it's always going to be ignored and overwritten?
Couldn't the parameter be changed to "out" to avoid these warnings that
are false positives?

-- 
Saludos
Santiago A.




More information about the fpc-pascal mailing list