<< About M2SCI tools Code Matlab => Scilab mfile2sci >>

Scilab Help >> Code Matlab => Scilab > m2scideclare

m2scideclare

Giving tips to help M2SCI...

Syntax

%m2scideclare variable_name|sizes|data_type|property

Arguments

variable_name

Name of the declared variable. It can be a Struct field (e.g. x(1,2).name) or describe the contents of a Cell using syntax x(1,2).entries.
NOTE that for Cells and Structs, * can be used as an index (see examples below).

sizes

Sizes of the variable declared, separated by blanks. Any unknown size can be specified with ?.
NOTE that a Matlab character string as defined between single quotes is considered as a vector of characters. Therefore, for instance the size of 'string' is |1 6|.

data_type & property

data type and property (sub-type) of the variable. Possible values are documented in the Type page.

Property values that are not defined as a constant in m2ci -- like 'int8' or 'Axes' -- must be specified without quotes in the m2scideclare statement.

Description

The main difficulty for M2SCI (mfile2sci) is to find what variables are: dimensions, type...

To help this tool, just add comments beginning with %m2scideclare in the M-file to convert, (%m2sciassume was used in previous Scilab versions and is now obsolete).

All data given by m2scideclare are compared with infered data. In case of conflict, inferred data are kept and a warning message is displayed. If you are sure about your data, report a bug.

Examples

See also

History

VersionDescription
6.1.1 m2scideclare supports all new defined vtypes and properties Polynomial, Function/Macro, Function/Builtin, String/Char, Handle/'Figure', Handle/'Axes', Int/'int8', Int/'int16', Int/'int32', Int/'int64', Int/'uint8', Int/'uint16', Int/'uint32', Int/'uint64', Sparse/Boolean. Sparse type is now actually supported.

Report an issue
<< About M2SCI tools Code Matlab => Scilab mfile2sci >>