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 |
| Boolean | 4 | 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 |
| Polynomial | 2 | Real, Complex, Unknown |
| Function | 13 | 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
| Versão | Descrição |
| 6.1.1 |
|
| Report an issue | ||
| << Operation | internals | Variable >> |