Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (21 sloc) 856 Bytes
=begin pod :kind("Type") :subkind("enum") :category("basic")
=TITLE enum Endian
=SUBTITLE Indicate endianness (6.d, 2018.12 and later)
enum Endian <NativeEndian LittleEndian BigEndian>;
X<|NativeEndian>
X<|LittleEndian>
X<|BigEndian>
X<|Endian>
An enum for indicating endianness, specifically with methods on C<blob8> and
C<buf8>. Consists of C<NativeEndian>, C<LittleEndian> and C<BigEndian>.
=head1 Methods
=head2 routine Numeric
multi method Numeric(Endian:D --> Int:D)
Returns the value part of the C<enum> pair.
say NativeEndian.Numeric; # OUTPUT: «0␤»
say LittleEndian.Numeric; # OUTPUT: «1␤»
say BigEndian.Numeric; # OUTPUT: «2␤»
Note that the actual numeric values are subject to change. So please use
the named values instead.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
You can’t perform that action at this time.