gpt4 book ai didi

rebol - cd 命令在 Red 中的相同上下文中表现不同

转载 作者:行者123 更新时间:2023-12-02 01:06:59 25 4
gpt4 key购买 nike

查看最新行:从相同的上下文 %/C/目录,执行“cd rebol”在一种情况下有效,而在另一种情况下无效:

    >> what-dir
== %/C/rebol/
>> cd ..
== %/C/
>> what-dir
== %/C/
>> cd rebol
== %/C/rebol/
>> what-dir
== %/C/rebol/
>> cd /
*** Script Error: / operator is missing an argument
*** Where: catch
*** Stack:

>> what-dir
== %/C/rebol/
>> cd ..
== %/C/
>> cd rebol
== %/C/rebol/
>> cd %/
== %/
>> what-dir
== %/C/
>> cd rebol
*** Access Error: cannot open: %/rebol/
*** Where: do
*** Stack: cd change-dir cause-error

>>

最佳答案

我现在不在 Windows 上,所以我无法测试它,但我相信这里有问题:

>> cd %/
== %/
>> what-dir
== %/C/
>> cd rebol
(...)

cd %/ 将目录更改为根目录,根据 what-dir 的报告,这绝对是 %/C/。所以我猜 what-dir 报告了错误的目录。稍后我会尝试添加信息,当我在 Windows 上检查它时,或者也许有人会更快并确认它:)您也可以尝试 read %/ 看看那里有什么(它应该是 Windows 驱动器 block )。

关于rebol - cd 命令在 Red 中的相同上下文中表现不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47089101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com