是否有Er代码格式化工具?
Source code beautifierer代码美化工具
感谢! 在线等,{:yxh96:}
急求大圣回复
希望大圣能够指导
谢谢,在线等{:yxh137:} erl_tidy:file("t_app.erl").
回复 3# shijiang1130
恩恩, 感谢感谢!{:yxh45:}
我试下 {:yxh71:} 回复 3# shijiang1130
不知道是怎么回事,
还希望大神能够指导指导,{:yxh79:}
m(erl_tidy).
erl_tidy:file("p.erl").-module (p).
-compile (export_all).
-define (P (V), io:format ("~p ", )).
-define (PP (V), io:format ("~n~s = ~p~n", [??V, V])).
loop (A, A, A, _, MAX) -> MAX;
loop (A, B, B, P, MAX) -> loop (A + 1, A + 1, B, P, MAX);
loop (A, B, C, P, MAX) ->
AB = A * B,
case AB > MAX andalso P(AB) of
true -> ?P (AB), loop (A, B + 1, C, P, AB);
____ -> loop (A, B + 1, C, P, MAX) end.
main(_) ->
Palindrome = fun (X) ->
Y = integer_to_list (X),
Y == lists:reverse (Y) end,
A = 100,
B = 999 + 1,
MAX = loop ( A, A, B, Palindrome, 0),
?PP (MAX),
halt().
不知道是怎么回事 {:yxh4:} {:yxh4:}
- define ( PP ( V ) , io : format ( "~n~s = ~p~n" , [ ? ? V , V ] ) ) .-module(p).
-compile(export_all).
-define(P(V), io:format("~p ", )).
- define ( PP ( V ) , io : format ( "~n~s = ~p~n" , [ ? ? V , V ] ) ) .
loop(A, A, A, _, MAX) -> MAX;
loop(A, B, B, P, MAX) -> loop(A + 1, A + 1, B, P, MAX);
loop(A, B, C, P, MAX) ->
AB = A * B,
case AB > MAX andalso P(AB) of
true -> ?P(AB), loop(A, B + 1, C, P, AB);
____ -> loop(A, B + 1, C, P, MAX)
end.
main(_) ->
Palindrome = fun (X) ->
Y = integer_to_list(X), Y == lists:reverse(Y)
end,
A = 100,
B = 999 + 1,
MAX = loop(A, A, B, Palindrome, 0),
?PP(MAX),
halt().
输出结果比较乱{:yxh4:}
old-define (PP (V), io:format ("~n~s = ~p~n", [??V, V])).new- define ( PP ( V ) , io : format ( "~n~s = ~p~n" , [ ? ? V , V ] ) ) . 大神{:yxh71:}
如何排除空行 {:yxh4:}-module(p).
-compile(export_all).
-define(P(V), io:format("~p ", )).
-module(p).
-compile(export_all).
-define(P(V), io:format("~p ", )).
页:
[1]