![]() |
Prev | Next | lang_m4 |
.
)
used for scripting language; e.g., py
for Python files.
True
for Python.
False
for Python.
and
for Python.
!
for Perl.
end
for Octave.
Note that in Python, the comment symbol #
is used.
This suffices because the level of indentation (by tabs)
is reduced by one when the block terminates.
#
for Python.
;
.
Note that this text use automatically included by macros that
are documented as statements.
Catch_
.
End_
.
*.pm
file.)
Module_
has no arguments,
it is the Cppad Swig module name
for scripting language; e.g., py_cppad
for Python.
Module_(name)
references the specified name in the swig module.
For example, in Octave it might be
m_cppad.name
ModuleCtor_(name)
references the specified constructor in the swig module.
For example, in Octave it might be
m_cppad.name
while in Perl it could be
new pm_cppad::name
Var_(variable)
retrieves the value of the specified variable.
For example, in Python it could be
variable
while in Perl it could be
$variable
.
Note that this text is automatically included for macro arguments
that are documented as being a
variable
; e.g.,
seen Member_
below.
Member_(variable, name)
references the specified member function or data
in the context of the specified variable.
For example, in Perl it might be
$variable->name
StringEqual_(left, right)
results in true (false), if the string
left
is equal (not equal) to the string
right
.
(Note that in C++, left operand must be a
std::string
while the right might be a char*
.)
NewVar_(type, variable, value)
declares the new specified variable with the specified type
and assigns it the specified value.
For example, in Octave it could be
variable = value;
Note the semi-colon at the end which suppressed printing the value
(in the Octave language).
In C++, it could be
type variable = value;
Assign_(variable, value)
assigns the specified value to an existing variable.
For example, in Python it could be
variable = value
AndAssign_(variable, value)
assigns the specified logical variable to the binary expression
of itself and the value.
For example, in Octave it could be
variable = variable && value;
VecSet_(vector, index, value)
sets the element with the specified index, in the specified vector, to the
specified value.
For example, in Python it might be
vector[index] = value
VecGet_(vector, index)
gets the value of the element with the specified index,
in the specified vector.
For example, in Perl it might be
$vector->get(index)
BeginBoolFun_(return_variable, FunctionName_)
is placed at the beginning of function that has zero arguments
and a boolean return value.
This must initialize
return_variable
as true.
For example, in Octave it might be
function return_variable = FunctionName_()
%
% load the Cppad Swig library
m_cppad
%
% initialize return value
return_variable = true;
Note that this begins a block of code that will be terminated
by a corresponding End_
.
The argument
FunctionName_
should be related to
the xam input file as follows:
FunctionName_
.
Return_(return_variable)
terminates the current function block with the specified return value
a matching End_
.
For example, in Python it might be
return return_variable
For_(variable, upper)
starts a for loop the specified integer index variable.
The initial value of the variable is zero.
The variable increases by one each time through the loop.
The value of the index the last time through the loop is
upper-1
.
The block inside the loop is terminated by a matching
End_
.
If_(expression)
starts an if
block that is executed when the expression is true.
The block is terminated by a matching
End_
.