We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M = 10 a = @SVector [1 for _ in 1:M] # working
put it in a function:
function test() M = 10 a = @SVector [1 for _ in 1:M] end
then it would throw error:
ERROR: LoadError: UndefVarError: `M` not defined Stacktrace: [1] top-level scope @ none:1 [2] eval @ Core .\boot.jl:383 [inlined] [3] static_vector_gen(::Type{SVector}, ex::Any, mod::Module) @ StaticArrays D:\Julia\.julia\packages\StaticArrays\EHHaF\src\SVector.jl:62 [4] var"@SVector"(__source__::LineNumberNode, __module__::Module, ex::Any) @ StaticArrays D:\Julia\.julia\packages\StaticArrays\EHHaF\src\SVector.jl:152 in expression starting at D:\Project\Ali\test.jl:5 in expression starting at D:\Project\Ali\test.jl:2
@SVector, @SArray, @SMatrix, @MVector, @MArray, @MMatrix all behave the same.
@SVector
@SArray
@SMatrix
@MVector
@MArray
@MMatrix
The text was updated successfully, but these errors were encountered:
No branches or pull requests
put it in a function:
then it would throw error:
@SVector
,@SArray
,@SMatrix
,@MVector
,@MArray
,@MMatrix
all behave the same.The text was updated successfully, but these errors were encountered: