Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of c\c++ compiler directives in Julia

using compiler directives like

#if A
some instructions 
#elseif B
some instructions
#end

In C\C++ language, one can tell the compiler to ignore some parts of code under some conditions. I`m curious about to know if there is an equivalent of this feature in Julia language.

like image 333
Alireza Ghavaminia Avatar asked Oct 16 '25 14:10

Alireza Ghavaminia


1 Answers

@static is what you're looking for.

@static if A
  some instructions
elseif B
  some instructions
end
like image 161
Gnimuc Avatar answered Oct 18 '25 23:10

Gnimuc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!