Host introspection: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: final quote was missing) |
(→{{header|Perl 6}}: Note simpler endian detection in Rakudo 2018.12) |
||
Line 844: | Line 844: | ||
<pre>8 |
<pre>8 |
||
little-endian</pre> |
little-endian</pre> |
||
Note: Rakudo 2018.12 is introducing the endian-sensitive<code>read-int16</code> method, |
|||
which makes endian detection a little easier: |
|||
<lang perl6>say blob8.new(1,0).read-int16(0) == 0 ?? "little-endian" !! "big-endian"</lang> |
|||
=={{header|Phix}}== |
=={{header|Phix}}== |