ZHANG Dao-yuan schrieb:
E.g.
function f0: boolean;
begin
f0:= false;
end;
begin
f0;
end;
the returned value f0 is dropped.
Compile it and the compiler won't print any warning.
Yes, of course. What do you expect? If you don't use the return value
for any purpose it is dropped.
Any modifier or cmd option can make the compiler print warning for
this case?
(my compiler is 2.4.5 x86_64 Linux)
Yes, there is a compiler switch that lets the compiler show an error
when not using function return values. But I don't have it at hand now.
Just look into the documentation.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal