The signature of inc
is described in the documentation:
procedure Inc(var X: Ordinal; [ N: Integer]); overload;
procedure Inc(var X: Ordinal; [ N: Integer]); overload;
In other words it is a procedure that receives the variable to be incremented as a var
parameter. It is not a function and does not return a value.
Your code should be:
inc(iCount);