Forum > Beginners

passing a procedure as argument

(1/1)

Nebulix:
I imported a program from Turbo Pascal in which there is a call to a procedure with an other procedure as argument
procedure1 ( procedure2, other arguments);
and I get an error message at compilation :
 wrong number of parameters specified for call to procedure2.
Is there a way of fixing that ?

User137:
In fpc you may need a pointer of procedure, so @procedure. Otherwise you could show more/full code for us to get a better idea of the problem. How did you declare procedure1, procedure2 and the pointer type?

Nebulix:
Sorry, this was a beginners mistake. I just Went to Options/Compiler and checked Turbo Pascal compatible and got ...an other error, I will ask about in a new post

Navigation

[0] Message Index

Go to full version