Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.1.0 - Русский


getNbInputArgument (Scilab gateway)

A C gateway function which provides the number of input arguments present in the calling Scilab function

Syntax

int* nb_params = getNbInputArgument(void* _pvCtx)
int nb_params = nbInputArgument(void* _pvCtx)
int nb_params = Rhs

Arguments

_pvCtx

Scilab environment pointer, pass in "pvApiCtx" provided by api_scilab.h

nb_params

the pointer on the number of input arguments present in the calling Scilab function

Description

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

Examples

In this example, the C interface function can take several input arguments and prints in the Scilab console the integer corresponding to the number of input arguments detected in the calling Scilab function.

#include "api_scilab.h"
#include "sciprint.h"

int sci_myrhs(char * fname)
{
  sciprint("The number of input parameters is %d\n", *getNbInputArgument());

  return 0;
}

See also

  • getNbOutputArgument — A C gateway function which provides the number of output arguments present in the calling Scilab function
  • sciprint — A C gateway function which displays standard messages to the user (same profile as the C printf function)
Report an issue
<< Double writing (Scilab gateway) Low level functions getNbOutputArgument (Scilab gateway) >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon May 22 12:41:19 CEST 2023