isa
checks variable type
Syntax
status = isa(var, type)
Arguments
- var
a Scilab variable.
- type
A string representing the variable type.
- status
Boolean:
%t
ifvar
isa
type
. otherwise %f
Description
type
can be of the following value:
"double"
, "constant"
, "string"
,
"int8"
, "int16"
, "int32"
, "int64"
,
"uint8"
, "uint16"
, "uint32"
, "uint64"
,
"int"
, "integer"
, "signed"
, "unsigned"
,
"bool"
, "boolean"
, "poly"
, "polynom"
, "polynomial"
,
"list"
, "tlist"
, "mlist"
, "sparse"
, "bsparse"
, "booleansparse"
,
"lib"
, "library"
, "function"
, "fptr"
, "builtin"
,
"ce"
, "cell"
, "classdef"
, "object"
Examples
isa([1 2 3], "double") // %T isa([1 2 3], "string") // %F isa(["1" "2" "3"], "string") // %T isa(int8(1), "int") // %T isa(int8(1), "integer") // %T isa(int8(1), "signed") // %T isa(int8(1), "unsigned") // %F t = table([1 2 3]', ["1" "2" "3"]'); isa(t, "mlist") // %T isa(t, "table") // %T isa(cos, "fptr") // %T isa(cos, "function") // %T isa(cos, "builtin") // %T isa(cosd, "function") // %T isa(cosd, "builtin") // %F classdef test, end isa(test, "classdef") // %T isa(test(), "object") // %T isa(test(), "test") // %T
History
Versão | Descrição |
2026.0.0 | isa introduction. |
Report an issue | ||
<< hypermatrices | types | Lambda functions >> |