「新手入门」关于程序调试

请问一下这个错误是什么原因引起的:

LoadError: syntax: type declarations on global variables are not yet supported

显示我21行代码有问题,我21行代码如下:

const COL::Int64 = 3
const ROW::Int64 = 3
const ITERATION::Int64 = 20
const THREASHOLD::Float64 = 1e-8

Types · The Julia Language RTFM

1 个赞

从你给的链接中有一些说明:

Currently, type declarations cannot be used in global scope, e.g. in the REPL, since Julia does not yet have constant-type globals.

试试将类型声明去掉呢,去掉::Int64/Float64看看