Zaka E-Lab schrieb: > 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?
Normal because FPC emulates TP7, just add {$X+} in TP6 and you get the same behaviour. > > 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. > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal