[fpc-pascal] Compiler option to check return value ignorance
leledumbo_cool at yahoo.co.id
Wed Aug 13 11:52:11 CEST 2008
Joost van der Sluis wrote:
> And there's no way the compiler can detect this.
I don't think so. The compiler understand that a procedure doesn't return a
value while a function does (i.e. trying to return a value from a procedure
causes compile error). I haven't checked how compiler formats each
function/procedure in the PPU but I think there should be an information
whether it's a function or procedure. So, I think it's possible to detect if
a function call is assigned to a variable or not.
View this message in context: http://www.nabble.com/Compiler-option-to-check-return-value-ignorance-tp18958911p18960053.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal