next up previous contents index
Next: Optional arguments Up: Module's header Previous: Options   Contents   Index


Needed arguments


H_id - >C_id

defines a needed argument with input value. C_id is a C variable of scalar type (e.g. char), in this case its value is defined in the command line by writting the number (or character) on the terminal, or a C variable of MegaWave2 type (e.g. Cmovie), in this case its value is given by writting the file name on the terminal. In the body of the module function, you are sure to be able to access to the content of this variable. Do not perform any deallocation on it, since MegaWave2 may try to access it after the end of the module.


H_id - >C_id[Min,Max]

defines a needed 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 a needed argument with output value. C_id is a C variable of type pointer to a scalar (e.g. char *) or a C variable of MegaWave2 type (e.g. Cmovie). It can be also the return of the module (e.g. H_id < -fentropy if fentropy is the module function which returns a value of the same type than C_id), although this form is not always recommanded when the return value is a MegaWave2 object (since the structure has to be allocated at each call to the module). The pointer C_id can never be NULL (MegaWave2 allocates space for the value, if needed). If C_id is of MegaWave2 type, 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''). MegaWave2 writes the output value at the end of the module from the content of *C_id.

Caution: when C_id is a pointer to a scalar, there is no number (nor character) to write in the command line, and therefore these needed argument is virtual (it does not appear in the usage print).


next up previous contents index
Next: Optional arguments Up: Module's header Previous: Options   Contents   Index
mw 2004-05-05