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 > GetType

GetType

C gateway function which returns the type of a parameter in the Scilab memory

Calling Sequence

SciType GetType(StackPos)

Arguments

StackPos

the position on the Scilab memory of the parameter for which we want to know the type (input argument)

SciType

the type (defined in the sci_types enum which you can find in stack-c.h) of the parameter at position StackPos in the Scilab memory

Description

GetType is a C gateway function which returns the type of a parameter in the Scilab memory. You must include stack-c.h to benefit from this function.

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 gateway function takes one input argument and prints the integer corresponding to the type of the variable sent as argument in the Scilab console.

#include <stack-c.h>
#include <sciprint.h>

int sci_mygettype(char * fname)
{
  sciprint("The type of the first argument is %d\n", GetType(1));

  return 0;
}

See Also

  • sciprint — A C gateway function which displays standard messages to the user (same profil as the C printf function)
  • sci_types — a C enumeration which defines the types available for a variable
<< GetRhsVar Scilab Gateway API IsOpt >>

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