如何将 Scala 脚本拆分为多个文件 [英] How to split a Scala script into multiple files

查看:50
本文介绍了如何将 Scala 脚本拆分为多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用作脚本语言,Scala 是否有某种包含指令,或者有没有办法从其他脚本启动脚本?

Used as a scripting language, does Scala have some sort of include directive, or is there a way to launch a script from an other script ?

推荐答案

scala 命令具有 :load filename 命令以交互方式加载 Scala 文件.或者,可以使用 scala 命令的 -i filename 参数来预加载文件.

The scala command has the :load filename command to load a Scala file interactively. Alternatively the scala command's -i filename argument can be used to preload the file.

这篇关于如何将 Scala 脚本拆分为多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆