Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Kotlin REPL中加载文件_Kotlin_Read Eval Print Loop - Fatal编程技术网

如何在Kotlin REPL中加载文件

如何在Kotlin REPL中加载文件,kotlin,read-eval-print-loop,Kotlin,Read Eval Print Loop,根据Kotlin REPL中的:help,我可以通过load:命令加载文件 >>> :help Available commands: :help show this help :quit exit the interpreter :dump bytecode dump classes to terminal :load <file> load scrip

根据Kotlin REPL中的
:help
,我可以通过
load:
命令加载文件

>>> :help
Available commands:
:help                   show this help
:quit                   exit the interpreter
:dump bytecode          dump classes to terminal
:load <file>            load script from specified file
无论是
load:Rational.kt
还是
load:Rational.kt
都不起作用。 如何在REPL中加载文件?
我找不到它的示例。

请尝试不使用引号:


>>:load Rational.kt

您的回答让我注意到我使用的是
load:
而不是
:load
。谢谢
>>> load: "Rational.kt";
error: unexpected tokens (use ';' to separate expressions on the same line)
load: "Rational.kt";