Host introspection: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Note simpler endian detection in Rakudo 2018.12)
m (→‎{{header|Perl 6}}: changed sense of new test, as per S03-buf/read-num.t)
Line 846: Line 846:
Note: Rakudo 2018.12 is introducing the endian-sensitive<code>read-int16</code> method,
Note: Rakudo 2018.12 is introducing the endian-sensitive<code>read-int16</code> method,
which makes endian detection a little easier:
which makes endian detection a little easier:
<lang perl6>say blob8.new(1,0).read-int16(0) == 0 ?? "little-endian" !! "big-endian"</lang>
<lang perl6>say blob8.new(1,0).read-int16(0) == 1 ?? "little-endian" !! "big-endian"</lang>


=={{header|Phix}}==
=={{header|Phix}}==