Hello,
The C++ 11 standard defines a macro __func__ which yields the name of the enclosing function as a null terminated character string. Using Pascal as an example, it does the following:
function myfunction(parameters here) : returntypehere;
begin
writeln('Currently executing', __func__);
end;
would output: "Currently executing
myfunction"
does FPC have a way of getting the name of the function (myfunction in this case, i.e, __func__ equivalent) ?
This is particularly convenient when outputting error messages, spares the programmer from having to type (and possibly misspell) the name of the function in error messages and any other messages where the function name would be useful information to have.
Thank you for your help