1)Then you do not understand that the stringlists are local to the function. In that case there is really no need for nil, since after function exit they are out of scope.
2)If the rest of the code executes, the result is always true. On any kind of exception the result remains false.
3)True, but I did not in my small example.
4) add as needed. just before finally of output.
TIP
5) optionally add code to check read/write protection.
1. I will try that after i found out how to detect memory leaks within Lazarus, on my old IDE it is a must to free created objects. Thank you for that information. Sorry that i am sceptical on that.
2. I agree you, i am used to do it my way but you would, if you would also write, get True for empty files, no?
3. I do not know to what you refer
4. I do not know to what you refer
5. You are absolut correct, my way is just a working horse, it say Yes (True) or No (False) as Result, not much checking internal on that matter.