こんにちは、サンプルの erlang コードがあります。
%%file_comment
-module(helloworld).
%% ====================================================================
%% API functions
%% ====================================================================
-export([add/2,subtract/2,hello/0,greet_and_math/1]).
%% ====================================================================
%% Internal functions
%% ====================================================================
add(A,B)->
A+B.
subtract(A,B)->
io:format("SUBTRACT!~n"),
A-B.
hello()->
io:format("Hello, world!~n").
greet_and_math(X) ->
hello(),
subtract(X,3),
add(X,2).
そして、私が走るとき
helloworld:greet_and_math(15).
出力は次のとおりです。
こんにちは世界!
減算!
17
私の疑問は、15-2=13 である AB がコンソールに表示されないのはなぜですか?