Skip to content

Commit

Permalink
more about identifier terms
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Sep 15, 2012
1 parent 0321dd8 commit 0bfe5ec
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions lib/terms.pod
Expand Up @@ -95,6 +95,17 @@ TODO
=head1 Identifier terms
There are built-in identifier terms in Perl 6, which are listed below.
In addition one can add new identifier terms with the syntax
sub term:<fourty-two> { 42 };
say fourty-two
or as constants
constant forty-two = 42;
say fourty-two
=head2 self
Inside a method, C<self> refers to the invocant (i.e. the object the method
Expand All @@ -109,4 +120,21 @@ Returns an L<Instant> object representing the current time.
Returns a pseudo-random L<Num> in the range C<0..^1>.
=head2 pi
Returns the number C<pi>, i.e. the ratio between circumference and diameter of
a circle.
=head2 e
Returns Euler's number
=head2 i
Returns the imaginary unit (for L<Complex> numbers).
=head1 Variables
Variables are discussed in L<variable language docs |/language/variables>.
=end pod

0 comments on commit 0bfe5ec

Please sign in to comment.