<div dir="ltr"><div style><span style="color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px">Hi,</span></div><span style="color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px"><div>
<span style="color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px"><br></span></div>In Delphi, there exists: </span><span style="color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px">TObject </span><span style="color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px">Class Function UnitName, which allows you to get the Unit of a given class. This seems not to be implemented in FreePascal.</span><div>
<font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px"><br></span></font></div><div><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px">If there a similar function available in FreePascal? (I am sure there is some way to do this using the VMT.)</span></font></div>
<div><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px">Alternatively, is there an easy way to just return the name of the current unit?</span></font></div>
<div><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px"><br></span></font></div><div><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px">Thank you,</span></font></div>
<div><font color="#000000" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17.99715805053711px"> Noah Silva<br></span></font><div><br></div></div></div>