-, , math3/1:
-module(npower62).
-export([math3/1]).
math3(N) when is_number(N) ->
N2 = N * N,
io_lib:format("square of ~p = ~p", [N, N2]).
, . , , N. , , io_lib:format/2, , . man -erl io.
:
<erl>
kv(K,L) ->
proplists:get_value(K, L, none).
out(A) ->
L = yaws_api:parse_post(A),
N = kv("number", L),
none =/= N, %% Assert we actually got a value from the kv lookup
%% Insert type mangling of N here so N is converted into an Integer I
%% perhaps I = list_to_integer(N) will do. I don't know what type parse_post/1
%% returns.
{html, npower62:math3(I)}
</erl>
, kv/2 proplists. kv/2 {value, {K, V}}, math3/1. proplists:get_value/3 V. , {html,...} . , npower62 , , .
, list_to_integer (N). - error_logger:info_report([{v, N}]) INFO REPORT , N.
TL; DR: , . , , , , , . .
, npower62:math3/1 erl. , , , .