Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> API Scilab > legacy > Scilab Gateway API > CheckRhs (deprecated)

CheckRhs (deprecated)

C macro which checks the number of input arguments present in the calling Scilab function. This function is obsolete.

Syntax

CheckRhs(nb_min_params,nb_max_params)

Arguments

nb_min_params

The minimum number of input arguments which must be present in the calling Scilab function

nb_max_params

the maximum number of input arguments which must be present in the calling Scilab function

Description

C macro which checks the number of input arguments present in the calling Scilab function. You must include api_scilab.h to benefit from this function.

If the number of input arguments is not between nb_min_params and nb_max_params, we quit the C interface (return 0;) and an error is returned in the Scilab console.

Since CheckRhs is doing a return 0; within the gateway function, it is important to call this macro before any memory allocation in order to avoid any memory leak.

WARNING: This API is deprecated from Scilab 5.2.0 and is going to be removed with Scilab 6.0. Please use API Scilab (the new Scilab API). This function has been replaced by CheckInputArgument.

Examples

#include "api_scilab.h"

int sci_my_function(char *fname, unsigned long l)
{
/* The expected profile of the function will be:
* a = my_function(a,b,c);
*/
  CheckRhs(3,3);
  CheckLhs(1,1);

}

See Also

  • CheckInputArgument — C function which checks the number of input arguments present in the calling Scilab function.
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:54 CEST 2016