Would be inlined function declared as inline and passed as argument?Only the result would be passed. The execution of the inline function's code would always be on the caller side (one exception is if the called function is also inline, then the compiler might optimize this a bit more). If you want to pass around functions you need to declare and use function pointers.
What's the purpose of using pointer to inline function? Optimization or ability to make function instances with different parameters?The first one - Optimization.
What's the purpose of using pointer to inline function? Optimization or ability to make function instances with different parameters? In second case you should look at anonymous functions (closures). Problem is: I'm not sure about trunk, but official versions of FPC/Lazarus still don't support them.It could be that the function is both directly called and passed along as a function variable. In the former case the compiler will then inline it (if nothing else prevents that). If the function is only passed on as a function variable then it's currently useless.
Would be inlined function declared as inline and passed as argument?