Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Example for #2142
  • Loading branch information
JJ committed Jul 5, 2018
1 parent b9f9757 commit 34d8575
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/Language/nativetypes.pod6
Expand Up @@ -140,6 +140,22 @@ Please check
L<the atomic operations section on the Numerics page|/language/numerics#Atomic_Operations>
for more information on this.
=head1 Rakudo specific types
The types described in this section are Rakudo specific, so they are not
guaranteed to be in other implementations or remain the same in future versions.
Test code that uses them heavily.
=begin table
long (long in C)
longlong (longlong in C)
ulong (long and unsigned in C)
ulonglong (longlong and unsigned in C)
size_t (size_t and unsigned in C)
ssize_t (size_t in C)
bool (bool in C)
=end table
=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
11 changes: 11 additions & 0 deletions size_t.p6
@@ -0,0 +1,11 @@
#!/usr/bin/env perl6

use v6;

use NativeCall;

my $just-an-array = CArray[int32].new( 1, 2, 3, 4, 5 );

loop ( my size_t $i = 0; $i < $just-an-array.elems; $i++ ) {
say $just-an-array[$i];
}

0 comments on commit 34d8575

Please sign in to comment.