Skip to content

Commit

Permalink
Introduction to compile time variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
fluca1978 committed Feb 26, 2018
1 parent 280d353 commit 4276eb2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/Language/variables.pod6
Expand Up @@ -1049,20 +1049,26 @@ the block to the caught exception.
X<|$?FILE>X<|$?LINE>X<|::?CLASS>X<|&?ROUTINE>X<|&?BLOCK>X<|%?LANG>X<|%?RESOURCES>
All compile time variables have a question mark as part of the twigil.
Being I<compile time> they cannot
be changed at run-time, however they are valuable in order to introspect
the program.
The most common compile time variables are the following:
=for table
$?FILE Which file am I in?
$?LINE Which line am I at?
::?CLASS Which class am I in?
&?BLOCK Which block am I in?
%?LANG What is the current set of interwoven languages?
%?RESOURCES The files associated with the "Distribution" of the current compilation unit.
=head3 Other compile-time variables:
X<|$?PACKAGE>X<|$?MODULE>X<|$?CLASS>X<|$?ROLE>
X<|$?GRAMMAR>X<|$?TABSTOP>X<|$?NL>X<|$?ENC>
The following compile time variables allow for a deeper introspection:
=for table
$?PACKAGE Which package am I in?
$?MODULE Which module am I in?
Expand Down

0 comments on commit 4276eb2

Please sign in to comment.