【发布时间】:2020-11-07 00:10:42
【问题描述】:
我有一个功能:
GiveBTree(z, depthMax):=block(
[ zz, t1, t2, tmp],
zz :[],
t1 :[z],
t2 :[],
tmp :[],
for depth : 1 thru depthMax step 1 do (
for z in t1 do (
tmp : Give2Preimages(z),
zz : append(tmp, zz),
t2 : append(tmp, t2)
)
tmp:[],
t1:t2
),
zz:flatten(zz),
return (zz)
)$
当我把它放在千里马时,我有:
Maxima 5.43.2 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) GiveBTree(z, depthMax):=block(
[ zz, t1, t2, tmp],
zz :[],
t1 :[z],
t2 :[],
tmp :[],
Display all 2857 possibilities? (y or n)
JACOBI_CD
! JACOBI_CN
!! JACOBI_CS
# JACOBI_DC
$ JACOBI_DN
问题似乎是在tmp之后开始的。
所以我检查了:
- 谷歌搜索:maxima cas“显示全部”
- Maxima 函数索引
- 描述(tmp)
这个定义有什么问题?
【问题讨论】:
-
我认为
tmp没有任何问题。我的第一个猜测是,当您输入一个空行时,会以某种方式触发 readline 的单词完成功能(它处理 GCL 的输入行编辑)。我有两个建议。 (1) 将程序放入一个文件中,比如说GiveBTree.mac,然后在Maxima 中说load("GiveBTree.mac");。 (2) 确保您拥有最新版本的 Maxima,该版本是使用除 GCL 之外的其他 Lisp 构建的。包管理器(如 apt-get)中的 Maxima 版本通常已过时。希望这会有所帮助。 -
commons.wikimedia.org/wiki/…*z_%2B_0.35.png
标签: lisp copy-paste maxima