is there a way of obtaining a function or procedure name string from FPC ? lazarus / 62-General ---------------------------------------------------------------------- 440bx · 2018-07-06 03:26 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: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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 ---------------------------------------------------------------------- ASerge · 2018-07-06 05:21 Only in future version. In trunk this work: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;{$APPTYPE CONSOLE}{$MODE OBJFPC} procedure SomeName;begin  Writeln('Name is ', {$I %CURRENTROUTINE%});end; procedure OtherName;begin  Writeln('Name is ', {$I %CURRENTROUTINE%});end; begin  SomeName;  OtherName;  Readln;end. ---------------------------------------------------------------------- howardpc · 2018-07-06 08:11 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$I %CURRENTROUTINE%}works in FPC 3.1.1 ---------------------------------------------------------------------- 440bx · 2018-07-06 15:29 Thank you for the replies, they are good news. I am looking forward the next stable release of FPC that includes this feature.  It's quite convenient for error messages. Now, I'm really curious, anyone have any idea when the next stable release that includes this feature might be coming out ? ---------------------------------------------------------------------- marcov · 2018-07-06 15:48 Quote from: 440bx on July 06, 2018, 05:29:28 pmNow, I'm really curious, anyone have any idea when the next stable release that includes this feature might be coming out ? Release process hasn't started yet, so minimum 6-9 months. ---------------------------------------------------------------------- 440bx · 2018-07-06 16:49 Quote from: marcov on July 06, 2018, 05:48:48 pmRelease process hasn't started yet, so minimum 6-9 months. 6 months would be great, it would make for a nice Xmas present.   Thank you for the update. ---------------------------------------------------------------------- engkin · 2018-07-06 19:14 Quote from: 440bx on July 06, 2018, 06:49:02 pmQuote from: marcov on July 06, 2018, 05:48:48 pmRelease process hasn't started yet, so minimum 6-9 months. 6 months would be great, it would make for a nice Xmas present. I thought you already had one. ---------------------------------------------------------------------- 440bx · 2018-07-06 19:38 Quote from: engkin on July 06, 2018, 09:14:52 pmQuote from: 440bx on July 06, 2018, 06:49:02 pmQuote from: marcov on July 06, 2018, 05:48:48 pmRelease process hasn't started yet, so minimum 6-9 months. 6 months would be great, it would make for a nice Xmas present. I thought you already had one.  yeah, I did... you gave me one already but... you know kids, they always want more