Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.0.0 - English


Type

Create a tree containing type inference data

Syntax

tp = Type(vtype, property)

Arguments

vtype

data type

property

property of data

tp

a "type" tlist

Description

This function create a tlist representing type inference data when using M2SCI. All input parameters values are verified to be compatible with "M2SCI tlists". (Unknown=-1 in M2SCI)

Available vtype and property values are listed below:

vtype values Scilab type property values
Double 1 Real, Complex, Unknown
Boolean4 Boolean
  6 Sparse
    Unknown
Sparse 5 Real, Complex, Unknown
Int 8 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64', Unknown
Handle 9 'Figure', 'Axes', Unknown
String 10 String, Char, Unknown
Polynomial2 Real, Complex, Unknown
Function13 Macro
  130 Builtin
    Unknown
Struct 16 (unused)
Cell 17 (unused)
Unknown   Unknown

? is equivalent to the Unknown value. Boolean, Int, Double, Sparse, Real, Complex, Handle, String, Char, Polynomial, Function, Macro, Builtin, Struct, Cell, and Unknown are predefined m2sci constants.

Examples

Type(Double, Complex)
Type(Sparse, Unknown)
Type(Int, 'uint32')
Type(Handle, 'Axes')
Type(Boolean, Sparse)
Type(String, Char)

See also

  • m2scideclare — Giving tips to help M2SCI...
  • Funcall — Create the converted pseudo-code representing a function call
  • Operation — Generates the Scilab pseudo-code representing an operation
  • Variable — Generates the Scilab internal code representing a variable (without its content)
  • Cste — Create a tree representing a constant
  • Infer — Create a tree containing inference data
  • Contents — Create a tree containing contents inference data
  • Equal — Generates the Scilab internal code representing an instruction "LHS = RHS"

History

VersionDescription
6.1.1
  • The Function type is now generic: Its property can now be Builtin or Macro, in addition to Unknown. Builtin as a type is removed.
  • Polynomial type added, with property Real, Complex, or Unknown.
  • String type: New property values: String and Char, in addition to Unknown.
  • Handle type: 'Figure' and 'Axes' property values added, in addition to Unknown.
  • Int integer type: 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64' property values added.
  • Boolean type: default property is now Boolean, instead of Real. Sparse property added.
  • Void type removed (never ever used).
Report an issue
<< Operation internals Variable >>

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:
Tue Oct 24 14:30:10 CEST 2023