-2
根據Kotlin REPL中的:help
,我可以通過load:
命令加載文件。如何加載Kotlin中的文件REPL
>>> :help
Available commands:
:help show this help
:quit exit the interpreter
:dump bytecode dump classes to terminal
:load <file> load script from specified file
但加載文件失敗,像這樣。 Rational.kt
存在當前目錄。
>>> load: "Rational.kt";
error: unexpected tokens (use ';' to separate expressions on the same line)
load: "Rational.kt";
load: Rational.kt
和load: "Rational.kt"
都沒有工作。 如何在REPL中加載文件? 我找不到它的例子。而不是``:load`
你的回答讓我注意到我使用'負荷。謝謝。 – ironsand