Show quoted text 10 lines
Hello everybody,
Is there a macro or function that gives the current procedure's name?
E.g.
procedure TClass.SomeProc;
begin
writeln(Format('This procedure's name is %s', [THE_MACRO]));
end;
If you use Lazarus you can create a code template. Then you can type w plus Ctrl+J and you will get:
writeln(Format('This procedure's name is %s', ['TClass.SomeProc']));
I prefer
writeln('TClass.SomeProc '|);
The | symbol is where the cursor is positioned after the template was added.
Show quoted text 7 lines
should print
This procedure's name is TClass.SomeProc
or
This procedure's name is SomeProc
Mattias