Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.1 - Português

Change language to:
English - Français - 日本語 -

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

Ajuda Scilab >> API Scilab > Scilab Gateway API > CheckSameDims

CheckSameDims

C interface function which checks if two parameters send to the C function have the same size

Calling Sequence

CheckSameDims(StackPos_var1,StackPos_var2,m_var1,n_var1,m_var2,n_var2)

Arguments

StackPos_var1

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

StackPos_var2

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

m_var1

the number of lines of the parameter at position StackPos_var1 in the Scilab memory

n_var1

the number of columns of the parameter at position StackPos_var1 in the Scilab memory

m_var2

the number of lines of the parameter at position StackPos_var2 in the Scilab memory

n_var2

the number of columns of the parameter at position StackPos_var2 in the Scilab memory

Description

C interface function which checks if two parameters send to the C function have the same size. 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

In this example, the C interface function takes one input parameters and prints the integer corresponding to the type of the variable sent as parameter in the Scilab console.

#include <stack-c.h>

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

  CheckRhs(2,2);

  GetRhsVar(1, "d", &m1, &n1, &l1);
  GetRhsVar(2, "d", &m2, &n2, &l2);

  CheckSameDims(1,2,m1,n1,m2,n2); // Check that both vectors have the same size

  return 0;
}

See Also

  • CheckColumn — C interface function which checks if a parameter send to the C function is a column vector or not
  • CheckDims — C interface function which checks if a parameter send to the C function has the required dimensions
  • CheckRow — C interface function which checks if a parameter send to the C function is a row vector or not
  • CheckScalar — C interface function which checks if a parameter send to the C function is a scalar or not
  • CheckVector — C interface function which checks if a parameter send to the C function is a vector (column or row) or not
  • CheckOverLoad — C gateway function which tells Scilab to look for another overloaded function
  • CheckDimProp — C interface function which checks the comatibility between 2 arguments send to the C function
  • CheckLength — C interface function which checks the length of a vector send as a parameter to the C function
  • CheckSquare — C interface function which checks if a parameter send to the C function is a square matrix or not
  • How to check parameters — how to check parameter send to an interface using the C gateway functions
<< CheckRow Scilab Gateway API CheckScalar >>

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:
Thu Mar 03 11:00:37 CET 2011