<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks, I will look at the suggestions<br>
<br>
Mattias Gaertner wrote:
<blockquote cite="mid:20100303232407.1da4192a@limapholos" type="cite">
  <pre wrap="">On Wed, 03 Mar 2010 21:33:45 +0200
Wimpie Nortje <a class="moz-txt-link-rfc2396E" href="mailto:wimpienortje@gmail.com"><wimpienortje@gmail.com></a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">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;
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

 
  </pre>
  <blockquote type="cite">
    <pre wrap="">should print

This procedure's name is TClass.SomeProc

or

This procedure's name is SomeProc
    </pre>
  </blockquote>
  <pre wrap=""><!---->

Mattias
_______________________________________________
fpc-pascal maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a>

  </pre>
</blockquote>
</body>
</html>