Host introspection: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Replace experimental pack with a native solution (taken from C example))
m (→‎{{header|Perl 6}}: final quote was missing)
Line 840: Line 840:
say $*VM.config<ptr_size>;
say $*VM.config<ptr_size>;
my $bytes = nativecast(CArray[uint8], CArray[uint16].new(1));
my $bytes = nativecast(CArray[uint8], CArray[uint16].new(1));
say $bytes[0] ?? "little-endian" !! "big-endian;</lang>
say $bytes[0] ?? "little-endian" !! "big-endian";</lang>
{{out}}
{{out}}
<pre>8
<pre>8