caravaggio 发表于 2007-7-11 01:17:00

[求助] 在lisp里面建立了一个档案是不能马上读里面的数据吗?

<p>我的lisp里面做了这个:</p><p>(command "_.Shell" "ipconfig/all &gt;e:\\00-CAD\\04-NEW\\mac_ip.txt")</p><p>(setq ip:macipTXT (findfile "e:\\00-CAD\\04-NEW\\mac_ip.txt"))</p><p>出来 ip:macipTXT 的答案是nil, 但看见"mac_ip.txt" 档案是有生成的.&nbsp; &nbsp;要第二次远行这个程式才可以正常读取里面数据, 看来就是要肯定"mac_ip.txt"已经存在才能用, 请问高手们有什么解决的方法.</p><p>谢谢!!</p>

Andyhon 发表于 2007-7-11 07:59:00

(while (not (findfile "e:\\00-CAD\\04-NEW\\mac_ip.txt")) (princ ".")); Waiting ....

caravaggio 发表于 2007-7-11 22:46:00

<p>谢谢你的意见,我试过了,还是不行!</p><p>我加了如下的:</p><p>(setq N 0)</p><p>(while </p><p>&nbsp; (not (findfile "e:\\00-CAD\\04-NEW\\mac_ip.txt")) </p><p>&nbsp; (setq N (1+ N))</p><p>)</p><p>如果光是这样的话,N加到5942才找到文件, 但如果这个程式下面还有东西的话,N加到大概300就停了,就说错误了 !!</p>
页: [1]
查看完整版本: [求助] 在lisp里面建立了一个档案是不能马上读里面的数据吗?