Ali*_*nia 3 compiler-directives julia
使用编译器指令
#if A
some instructions
#elseif B
some instructions
#end
Run Code Online (Sandbox Code Playgroud)
在C\C++语言中,可以告诉编译器在某些条件下忽略代码的某些部分.我很想知道Julia语言中是否有相同的功能.
@static
是你在找什么.
@static if A
some instructions
elseif B
some instructions
end
Run Code Online (Sandbox Code Playgroud)