大家好, 问题如题, 我想在函数中应用某个包中的函数, 类似代码:
function test()
using Plots
x = collect(1:10)
y = x +1
plot(x,y)
end
报错信息:
syntax: "using" expression not at top level
include_string(::Module, ::String, ::String) at loading.jl:1005
include_string(::Module, ::String, ::String, ::Int64) at eval.jl:30
(::getfield(Atom, Symbol("##108#113")){String,Int64,String})() at eval.jl:91
withpath(::getfield(Atom, Symbol("##108#113")){String,Int64,String}, ::Nothing) at utils.jl:30
withpath at eval.jl:46 [inlined]
#107 at eval.jl:90 [inlined]
hideprompt(::getfield(Atom, Symbol("##107#112")){String,Int64,String}) at repl.jl:76
macro expansion at eval.jl:89 [inlined]
(::getfield(Atom, Symbol("##106#111")){Dict{String,Any}})() at task.jl:85
十分感谢