Some time ago, I posted about this. On the TP mode FreePascal can use a function as a procedure. Florian told me that that was because of the version of the TP emulation. Well, after that, I was happy with that until now. I discovered that, even adding {$x-} to the code, if you put a function inside a "for" or an "if" you can use a function as a procedure:
******************************************************************** program pru_funcion_como_procedimiento (input,output); {$x-} function pru_func:boolean; begin writeln ('Hola programador.'); pru_func := TRUE; end; { pru_func } procedure pru; var i : integer; begin for i:=1 to 10 do pru_func; end; { pru } begin pru; end. ********************************************************************* Is this still normal behaviour? I hope this helps anybody. Zaka. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal