#import "modules/std.sx"; #import "modules/math/math.sx"; #import "modules/compiler.sx"; #import "modules/test.sx"; pkg :: #import "modules/testpkg"; // --- Foreign function binding --- libc :: #library "c"; c_abs :: (n: s32) -> s32 #foreign libc "abs"; // --- Protocol declarations (Phase 1: static dispatch only) --- main :: () { // ======================================================== // 15. FOREIGN FUNCTION BINDING // ======================================================== print("=== 15. Foreign ===\n"); // Symbol rename: c_abs maps to C's abs() print("foreign-rename: {}\n", c_abs(xx -42)); }