-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