It is still true that you are writing bogus code and it is still true that const parameter passing means that that specific parameter should not EVER change value inside of a procedure or function.
1. May I remind you that this discussion is about out-modifier ?
2. Is it just your opinion, or have you actual prove this ?
this would mean the value of that parameter is actual copied to a new memory-location. Which is actually done when you pass a simple parameter without any modifier.
I think you really didn't understand the reason for the introduction of the const-modifier in the first place.
... and even the compiler proves you wrong.
It's working just the way i think it should work. Except for object/strings (non simple variables) where it works once but not twice.
BTW. I have no problem this or the other way, it only should be consistent.
or since we now have an
constref-modifier it would be good to have
outref-modifier.
Doesn't anyone find it annoying when you use a API-function which is declared with var parameter, that you get these unnecessary 'Variable not initialized'-hints ?
When the out-parameter would be working some of the var-declaration in the API/LCL/FCL could be replaced with out/outref-declaration so you get only these hints which are actually helpful.
Wouldn't that be a good thing ?