From 57222c8026514578b472cb9151f51fdfa16a01be Mon Sep 17 00:00:00 2001 From: Josh Nussbaum Date: Mon, 13 Jun 2016 02:19:17 -0400 Subject: [PATCH] Added example of using multiple params --- examples/basic.exs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/basic.exs b/examples/basic.exs index 18bd507..9cf5a32 100644 --- a/examples/basic.exs +++ b/examples/basic.exs @@ -2,6 +2,8 @@ defmodule MyLib do use FFI.Library, name: "libstdc++.so.6" attach_function :puts, [:string], :int + attach_function :printf, [:string, :int], :int end MyLib.puts("Hello World from C stdlib") +MyLib.printf("Random number: %d", :random.uniform(10))