Matlab和R都有自动分配给(Ans和Last)的变量。值分别)。
对于Julia是否有等价的?
。
function myBigSlowFunc()
sleep(10)
return(5)
end
myBigSlowFunc()
# Can I get the value that was returned without rerunning the function?
如果您在repl,您可以使用ans
(就像matlab)