Why does this assignment inside a loop fail in Julia 0.7 and 1.0?
问题 (k, a, b, a1, b1) = (BigInt(2), BigInt(4), BigInt(1), BigInt(12), BigInt(4)) while k <= BigInt(4) (p, q, k) = (k*k, BigInt(2)*k+BigInt(1), k+BigInt(1)) end This code compiles and runs in Julia 0.6, but in 1.0 produces ERROR: UndefVarError: k not defined . Did something change between versions? What's wrong with this code in Julia 1.0? 回答1: The answer by shadowtalker is correct. However, there is one important issue with this code that is worth adding some more explanation (and it was too long