How to resolve “UndefVarError: T not defined” in function signature
问题 I am trying to run (someone else's code) that looks like function f{T<:Number}(n::Int, alpha::T, beta::T) ... end When "using" that file I get UndefVarError: T not defined Stacktrace: [1] top-level scope at [file location]:[line number of function definition above] From what I've read in the documentation (https://docs.julialang.org/en/v1/base/numbers/), it looks like the syntax above is correct. Any idea why I'm getting this error? 回答1: This is old Julia syntax. This function should be re