<< Usage and conventions Usage and conventions Data types >>

CelestLab >> - Introduction - > Usage and conventions > Functions

Functions

Functions

Functions names

CelestLab functions have names that begin with the prefix "CL_". Most names have an additional prefix (2 or 3 letters) that indicates the purpose of the function. Some examples are:

Calling sequences (order of arguments)

There are rules that apply most of the time that are intended to make things easier:

Optional arguments default values

The default values for some optional arguments are given by variables whose names begin with "%CL_" (e.g. %CL_mu, %CL_eqRad...).

If an (optional) argument is omitted and the corresponding variable does not exist, the default value is retrieved internally. If the default value has to be changed, there are two possibilities:

Example:

// omitting optional argument:

kep = CL_oe_car2kep(pos,vel);

// changing default value - method 1:

kep = CL_oe_car2kep(pos,vel,3.98600E+14); // or: kep = CL_oe_car2kep(pos,vel,mu=3.98600E+14);

// changing default value - method 2:

%CL_mu = 3.98600E+14;

kep = CL_oe_car2kep(pos,vel);

Exception handling

All CelestLab functions should respect the following rules:

Note:

These are only guidelines. All functions may not follow them (yet). And there can be exceptions anyway.


Report an issue
<< Usage and conventions Usage and conventions Data types >>