tagged release 0.6.4
[parrot.git] / languages / perl6 / src / classes / Num.pir
blob215ca5c853d02a054ec0c74be9c144e07438852a
1 ## $Id$
3 =head1 TITLE
5 Num - Perl 6 numbers
7 =head1 SUBROUTINES
9 =over 4
11 =item onload()
13 =cut
15 .namespace [ 'Num' ]
17 .sub 'onload' :anon :init :load
18     .local pmc p6meta, numproto
19     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
20     numproto = p6meta.'new_class'('Num', 'parent'=>'Float Any')
21     p6meta.'register'('Float', 'parent'=>numproto, 'protoobject'=>numproto)
22 .end
25 =item ACCEPTS()
27 =cut
29 .sub 'ACCEPTS' :method
30     .param num topic
31     .return 'infix:=='(topic, self)
32 .end
35 =item perl()
37 Returns a Perl representation of the Num.
39 =cut
41 .sub 'perl' :method
42     $S0 = self
43     .return($S0)
44 .end
47 =back
49 =cut
51 # Local Variables:
52 #   mode: pir
53 #   fill-column: 100
54 # End:
55 # vim: expandtab shiftwidth=4 ft=pir: