$LastChangedDate: 27-Juil-2011 $

# CL_inputParam

Simple user-friendly input of parameters

## Calling Sequence

       [varargout] = CL_inputParam(desc)

## Description

- CL_inputParam in an interface to x_mdialog for an enhanced input of parameters. It should be used in conjunction with CL_defparam.

  Enhancements include the management of units and the validation of the values (that may belong to a set of accepted values or that can be checked using some arbitrary scilab expressions). Any scilab expression is a valid value for CL_inputParam.

  The number of output arguments is normally n, n being the number of parameter descriptions.

  An additional argument may be passed. Returned values for this argument are: %t (the 'OK' button has been pressed), and %f (the 'Cancel' button has been pressed). If only n output parameters are present, an error is generated if the 'cancel' button has been pressed. This error may be caught by try...catch.

## Parameters

desc:

  List of parameter descriptions (list of tlist of type CLparam). Use CL_defParam to initialize each description.

varargout:

  Output variables (1 for each parameter description + 1 optional 'OK' output variable). The parameter values in the varargout list are given in 'internal' units.

## Authors

- CNES - DCT/SB (AL)

## See also

- CL_defParam

## Examples

    desc=list(..
    CL_defParam("param 1",val=1000,units=['m', 'km'],valid='$x > 0',dim=-1),..
    CL_defParam("param 2",val=[1,2],units=['Z'],valid='$x < 10',dim=-1),..
    CL_defParam("param 3",val=[1,2,3,4,5,6,7,8],dim=-1,accv=1:10)..
    );
    [v1, v2, v3] = CL_inputParam(desc) // error if "cancel" pressed
    [v1, v2, v3, OK] = CL_inputParam(desc) // no error if "cancel" pressed