好吧,我在茱莉亚写了一个简单的“ hello world”,但是我不知道如何运行代码。我试着跑过去./nameOfMyFile.jl
,终端返回给我,我遇到语法错误。
我的代码是:
println("hello world")
如果我julia
在终端上运行并在此之后编写代码,则Wich可以完美地工作...
错误类似于(我正在从葡萄牙语翻译):
./hello_world.jl: line 1:syntax error close to the unexpected token `"hello world"
./hello_world.jl: line 1: `println("hello world")'
我正在使用vim,debian 8和julia 0.3.2
我可以想到的两种方法来实现您想要的
打开一个终端,然后执行以下任一操作
在julia relp内部,也就是说,如果您通过运行以下命令在终端中运行julia
julia
当你进去的时候
include("nameoffile.jl")
如果您只是想运行文件,请在终端中执行
julia nameoffile.jl
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句