[fpc-pascal] Turbo Pascal Mode Bug?

Zaka E-Lab shanatorio at gmail.com
Mon Oct 1 17:39:03 CEST 2007


Hello,

I have a peace of code that demonstrates that in the TP mode of
freepascal, one can use a function as a procedure.

Is this a bug or a normal behavior?

My University have replaced ( other time ) freepascal.org, and we
must use the archaic Turbo Pascal 6.0, cause they say that freepascal
don't respect the ISO Pascal.

I let you the code here:

program func_as_proc(input,output);

function pru_func:boolean;
begin
    writeln ('If I am printed, then you can use a function as a
procedure.');

    pru_func := TRUE

end; { pru_func }

begin
    (*
     *  Prove if a function can be used as a procedure.
     *)
    pru_func;
end.

Thanks in advance.




More information about the fpc-pascal mailing list