Memory layout of a data structure: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: add trans) |
(→{{header|Perl 6}}: also mention C-style reprs) |
||
Line 572: | Line 572: | ||
In the absence of shaped arrays, you can do the usual bit-twiddling tricks on a native integer of sufficient size. (Such an integer could presumably be mapped directly to a device register.) |
In the absence of shaped arrays, you can do the usual bit-twiddling tricks on a native integer of sufficient size. (Such an integer could presumably be mapped directly to a device register.) |
||
<lang perl6>$signal +|= 1 +< signal_ground;</lang> |
<lang perl6>$signal +|= 1 +< signal_ground;</lang> |
||
Using a native int is likelier to work on a big-endian machine in any case. Another almost-there solution is the mapping of C representational types into Perl 6 for native interfaces, but it does not yet support bit fields. |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |