Martin schrieb:
See my example about memory alloc in my other mail. It shows, that a piece of code (and it's ability to be "safely invoked ") does not solely depend on the parameters passed, but also on (selected parts of) the state of the application or system.
What when some code does not return anything, *and* cannot work at all due to some problem (out-of-memory, file deleted, object destroyed...)?
When e.g. a file search cannot proceed due to missing access rights? It cannot return an boolean value (succ/fail), because it's simply unknown whether the file exists.
When in case of an unexpected error the called procedure throws an exception? Can this procedure *ever* be "safely invoked", when it may return to some other place in code (exception handler)?
DoDi -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus