如何在Julia中获取宏帮助?

3
我想知道如何获得Julia宏的帮助,或者至少找到定义它的源文件。例如,我知道有一个名为@spawnat的宏。但是如果我尝试执行...
> julia> help( @spawnat )  
ErrorException("wrong number of arguments")

或者

> help( spawnat ) 
ErrorException("spawnat not defined")

这并不好...

1个回答

5

将其放在引号中:

julia> help("@spawnat")

提供

Base.@spawnat()

Accepts two arguments, "p" and an expression, and runs the
expression asynchronously on processor "p", returning a
"RemoteRef" to the result.

你可以使用help(help)命令来获取帮助信息。


1
具有讽刺意味的是,help("?")??似乎不起作用。如何获取有关?的更多信息? - Gray
1
哈哈,这很有趣。help(help)?help都可以使用,但我们也应该让??help("?")能够使用。问题已经开启:https://github.com/JuliaLang/julia/issues/6243。 - StefanKarpinski

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接