skeleton nif that runs

This commit is contained in:
Scott Chacon
2010-05-24 16:44:36 -07:00
commit 89c86150c8
4 changed files with 103 additions and 0 deletions

20
test Executable file
View File

@@ -0,0 +1,20 @@
#!/Users/schacon/otp_src_R13B03/bin/escript
%% -*- erlang -*-
%%! debug verbose -noshell
main([Object]) ->
try
geef:start(),
Test = geef:object_exists(4),
io:format("factorial ~s:~w~n", [Object, Test])
catch
_:_ ->
usage()
end;
main(_) ->
usage().
usage() ->
io:format("usage: factorial integer\n"),
halt(1).