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 > Low level functions > getNbOutputArgument (Scilab gateway)

getNbOutputArgument (Scilab gateway)

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

Syntax

int* nb_params = getNbOutputArgument(void* _pvCtx)
int nb_params = nbOutputArgument(void* _pvCtx)
int nb_params = Lhs

Arguments

_pvCtx

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

nb_params

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

Description

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

Examples

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

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

int sci_mylhs(char * fname)
{
  sciprint("The number of output arguments is %d\n", *getNbOutputArgument());

  return 0;
}

See Also

  • getNbInputArgument — A C gateway function which provides the number of input 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)
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