E2033 Types of actual and formal var parameters must be identical
I have this line of code throwing up the above error:
I've read about using the right vars/constants but that doesn't seem to work.
Any help, appreciated
A var parameter is passed by reference (that is, the method doesn't want only a value, but a variable (which comes with a value), which it can alter if necessary), so you need to pass a variable (of the right type), not only a value. This works:
var mybool: boolean; begin mybool := true; server := TIdHTTPServer.Create; server.OnQuerySSLPort(8092, mybool); // Now mybool can be either true or false; it's up to the method.