November 2017
Beginner
316 pages
6h 40m
English
Macros in Julia are a very powerful tool for code evaluation, and in some of the previous chapters, we have been using them regularly (for instance, using @time to know the overall compute time of a program).
Macros are similar to functions, but where functions take in normal variables as arguments, macros, on the other hand, take expressions and return modified expressions.
The syntax of a macro could be defined as follows:
macro NAME
# some custom code
# return modified expression
end
At the time of calling a macro, the @ symbol is used, which is used to denote a macro ...
Read now
Unlock full access