[Pas2js] Directive {$I %LINE%} - Feature request
Mattias Gaertner
nc-gaertnma at netcologne.de
Thu Jan 25 19:11:47 CET 2018
On Thu, 25 Jan 2018 11:53:01 -0600 (CST)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:
>[...]
> WriteLn ('Error in the method ' + {$I %FUNCTION%} + ' on line ' + {$I
> %LINE%});
>
> {$I %FUNCTION%} : includes a string literal containing the name of the
> function or method where the directive is.
For FPC compatibility this should be %CurrentRoutine%.
> {$I %FILE%} : includes a string literal containing the current file name
> where the directive is.
>
> {$I %LINE%} : includes a string literal containing the line number where the
> directive is.
>
> {$I %DATE%} : includes a string literal containing the date of compilation
> (yyyy-mm-dd).
>
> {$I %TIME%} : includes a string literal containing the time of compilation
> (hh:nn:ss).
See here for the FPC counterparts:
https://www.freepascal.org/docs-html/prog/progsu41.html#x48-470001.2.41
> Function GetCurrentLineNumber: String;
> begin
> Result := {$I %LINE%};
> end;
This does not make much sense, does it? :)
It's like:
https://www.xkcd.com/221/
Mattias
More information about the Pas2js
mailing list