Warning: Undefined variable $info in /home1/josetxoc/public_html/certif/showmanual.php on line 43

Warning: Trying to access array offset on value of type null in /home1/josetxoc/public_html/certif/functions.php on line 96

Warning: Undefined variable $thispage in /home1/josetxoc/public_html/certif/showmanual.php on line 50

spec

Software for Diffraction

2.4.4.4. - Macro Functions



Macro functions are a type of macro that can return values and can be used as an operand in expressions. The macro definition can include function arguments, which then become available to the body of the macro function. For example,
def factorial(n) '{
        if (n <= 1)
                return(1);
        return(n * factorial(n-1))
}'
The syntax of macro functions requires the macro name followed by a set of parenthesis which can contain a comma-separated list of argument names. The arguments names become local variables within the macro definition. The definition must be a statement block, that is, the statements must be enclosed in curly brackets.




Warning: Undefined variable $thispage in /home1/josetxoc/public_html/certif/showmanual.php on line 73