Created
December 3, 2014 19:14
-
-
Save tony-o/ed50c2ce5aa8c799c761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use Inline; | |
sub add(Int $a, Int $b) is inline('C') returns Int {' | |
#include <stdio.h> | |
DLLEXPORT int add (int a, int b) { | |
printf("Adding %d + %d = %d", a, b, a + b); | |
return a + b; | |
} | |
'}; | |
add(5,6).say; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment