Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - Français

Change language to:
English - 日本語 - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Manuel Scilab >> API Scilab > Scilab Gateway API > CheckLength

CheckLength

C interface function which checks the length of a vector send as a parameter to the C function

Calling Sequence

CheckLength(StackPos,m_var,m_required)

Arguments

StackPos

the position in the Scilab memory of the parameter for which we want to check (input parameter)

m_var

the number of lines of the parameter at position StackPos in the Scilab memory (input parameter)

m_required

the required number of lines (input parameter)

Description

C interface function which checks the length of a vector send as a parameter to the C function. You must include stack-c.h to benefit from this function. If the test fails, we return from the C interface and an adequate error message is printed in the Scilab console.

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).

Examples

#include <stack-c.h>

int sci_check_properties(char * fname)
{
  int m1, n1, l1;

  CheckRhs(1,1);

  GetRhsVar(1, "d", &m1, &n1, &l1);

  CheckLength(1,m1*n1,4); // Check that vector has 4 elements

  return 0;
}
<< CheckDims Scilab Gateway API CheckLhs >>

Copyright (c) 2022-2023 (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:
Wed Jan 26 16:24:17 CET 2011