Erlang:qlc:info引发错误,而qlc:eval则不-为什么?

问题描述

| 作品
root@test # erl
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]

Eshell V5.8.3  (abort with ^G)
1> Tmp = ets:new(test,[bag]),Ref = make_ref(),1> qlc:eval(qlc:q([Ref1 || Ref1 <- ets:table(Tmp),Ref =:= Ref1])).
[]
2> qlc:info(qlc:q([Ref1 || Ref1 <- ets:table(Tmp),Ref =:= Ref1])).
\"ets:table(16400,\\n          [{traverse,\\n            {select,\\n             [{\'$1\',\\n               [{\'=:=\',{const,#Ref<0.0.0.29>},\'$1\'}],\\n               [\'$1\']}]}}])\"
3> halt().
不起作用
root@test # erl
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]

Eshell V5.8.3  (abort with ^G)
1> Tmp = ets:new(test,1> qlc:eval(qlc:q([Ref1 || {Ref1} <- ets:table(Tmp),Ref =:= Ref1])).
[]
2> qlc:info(qlc:q([Ref1 || {Ref1} <- ets:table(Tmp),Ref =:= Ref1])).
** exception error: no match of right hand side value {error,{1,erl_parse,[\"syntax error before: \",[\"Ref\"]]}}
     in function  qlc:abstract/3
     in call from qlc:abstract/3
     in call from qlc:abstract/4
     in call from qlc:info/2
3> halt().
我不明白为什么。在一个更复杂的查询中发现了此错误,由于该错误,我无法解释和分析。     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)