Download MegaWave2 User's Guide

Transcript
Module’s header
MegaWave2 User’s Guide
Module’s header
37
H id − >C id [Min,Max]
defines an optional argument with input value and with interval checking (an error is send if the
input value does not fit into the given interval [Min,Max]). MegaWave2 types are not allowed.
Min and Max must be constant of same type than C id with Max > Min.
[H id = Val] − >C id
defines an optional argument with default input value. When the argument is not set by the user
then *C id= Val that is, one can never have C id = NULL. MegaWave2 types are not allowed.
Val must be a constant of same type than C id. Warning: no implicit conversions are made
(e.g. if C id is of type float, Val = 1.0 is allowed but not Val = 1).
[H id = Val ] − >C id [Min,Max]
defines an optional argument with input value and with interval checking (an error is send if the
input value does not fit into the given interval [Min,Max]). MegaWave2 types are not allowed.
Min and Max must be constant of same type than C id with Max > Min.
H id < −C id
defines an optional argument with output value. The argument has been given by the user if
and only if C id 6= NULL. If C id 6= NULL, MegaWave2 writes the output value at the end of the
module from the content of *C id. C id is a C variable of MegaWave2 type only (e.g. Cmovie).
If C id 6= NULL, you must allocate the structure to the right size using functions of the system
library, before doing any computation with this variable (see Volume two: “MegaWave2 System
Library”).
Restriction: C id cannot be a function (return value of the module), whereas this is allowed
with needed arguments (see section 4.3).
4.5
Variable arguments
. . . − >C id
defines variable arguments with input values. C id is a C variable of type pointer to a scalar
(e.g. char *), in this case its successive values are defined in the command line by writting the
numbers (or characters) on the terminal, or a C variable of MegaWave2 type (e.g. Cmovie), in
this case its successive values are given by writting the file names on the terminal. The module
function is call as many time as the number of variable parameters given in the command line.
If no variable parameters are given, the module function is called only once with C id = NULL.
. . . − >C id [Min,Max]
defines variable arguments with input values and with interval checking (an error is send if one
input value does not fit into the given interval [Min,Max]). MegaWave2 types are not allowed.
Min and Max must be constant of same type than C id with Max > Min.