We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#include "share/atspre_define.hats" #include "share/atspre_staload.hats" extern fun c_func_kick (int): int = "mac#" extern fun ats_func_plus1: (int) -> int = "ext#" implement ats_func_plus1 (a) = a + 1 implement main0 () = { val () = println! (c_func_kick 9) }
extern int ats_func_plus1(int); int c_func_kick(int a) { ats_func_plus1(a); }
$ patscc main.dats c_func.c -o main $ ./main
See "Introduction to Programming in ATS: Interaction with C".