- Manual Scilab
- Arquivos : funções de Entrada/Saída
- chdir
- fileinfo
- get_absolute_file_path
- getrelativefilename
- newest
- sscanf
- basename
- copyfile
- createdir
- deletefile
- dir
- dirname
- dispfiles
- fileext
- fileparts
- filesep
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- fullfile
- fullpath
- getdrives
- getlongpathname
- getshortpathname
- %io
- isdir
- isfile
- listfiles
- listvarinfile
- ls
- maxfiles
- mclearerr
- mclose
- mdelete
- meof
- merror
- mfprintf
- mscanf
- mget
- mgetl
- mgetstr
- mkdir
- mopen
- movefile
- mput
- mputl
- mputstr
- mseek
- mtell
- pathconvert
- pathsep
- pwd
- removedir
- rmdir
- save_format
- scanf
- scanf_conversion
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
save_format
format of files produced by "save"
Description
Variables are saved by Scilab with the save function in the following format:
each variable record is appended consecutively to the file. The variable record begins with 6 long integer holding the variable name in encoded format (see the Remarks section below),
After that comes the variable type (long integer), then, depending on it, for:
- Floating matrices (type 1)
row_size m (a long integer),
column_size n (a long integer),
real/complex flag it (a long integer in {0,1}),
data (n*m*(it+1) doubles)
- Polynomials (type 2) and Size implicit indices (type 129)
row_size m (a long integer),
column_size n (a long integer),
real/complex flag it (long integer in {0,1}),
formal variable name (16 bytes),
index_table (m*n+1 long integers);
data ((N-1)*(it+1) doubles) , where N is the value of the last entry of the index_table
- Booleans (type 4)
row_size m (a long integer),
column_size n (a long integer);
data (n*m long integers)
- Floating sparse matrices (type 5)
row_size m (a long integer),
column_size n (a long integer),
real/complex_flag it (a long integer in {0,1}),
total_number_of_non_zero_elements nel (a long integer),
number_of_non_zero_elements_per_row (m long integers),
column_index_non_zero_elements (nel long integers),
non_zero_values (nel*(it+1) doubles)
- Boolean sparse matrices (type 6)
row_size m (a long integer),
column_size n (a long integer),
unused it (a long integer),
total_number_of_non_zero_elements nel (a long integer),
number_of_non_zero_elements_per_row (m long integers),
column_index_non_zero_elements (nel long integers)
- Matlab sparse matrix (type 7)
row_size m (a long integer),
column_size n (a long integer),
real/complex_flag it (a long integer in {0,1}),
total_number_of_non_zero_elements nel (a long integer),
number_of_non_zero_elements_per_column (n long integers),
row_index_non_zero_elements (nel long integers),
non_zero_values (nel*(it+1) doubles)
- Integer matrices (type 8)
row_size m (a long integer),
column_size n (a long integer),
integer_type (a long integer): 1,2,4, or 11,12,14 for signed and unsigned 1,2,4 bytes integers;
data (n*m bytes for integer_type 1 or 11, n*m short integers for integer_type 2 or 12, n*m long integers for integer_type 4 or 14)
- handles (type 9)
version (4 bytes)
row_size m (a byte),
column_size n (a byte),
data (m*n serialization_records)
A serialization_record is a flat representation of the C data structure associated with the corresponding graphic object. Each graphic object is defined by a (recursive) set of properties (see the get) function).
- The saved serialization_record of a graphic object is structured as follow
type_length n (a byte)
type (n bytes, the ascii codes of the type name)
property_values record (variable length)
- Strings (type 10)
row_size m (a long integer),
column_size n (a long integer),
index_table (n*m+1 long integers);
data (N long integers, the Scilab encoding of the characters (see code2str), where N is the value of the last entry of the index_table
- Uncompiled functions (type 11)
nout (long integer),
lhs_names (6*nout long integers, see the Remarks section below),
nin (long integer),
rhs_names (6*nin long integers, see the Remarks section below);
code_length N (a long integer),
code (N long integers)
- Compiled functions (type 13)
nout (long integer),
lhs_names (6*nout long integers, see the Remarks section below),
nin (long integer),
rhs_names (6*nin long integers, see the Remarks section below),
pseudo_code_length N (a long integer),
pseudo_code (N long integers)
- Libraries (type 14)
path_length np (a long integer),
path_name (np long integers: the path character codes sequence, (see code2str)),
number of names nn (long integer),
names (6*nn long integers, see the Remarks section below);
- Lists (type 15), tlists (type 16), mlists (type 17)
number of fields n (a long integer),
index (n+1 long integers);
variables_sequence (n variables, each one written according to its format)
- Pointers (type 128)
Not handled
- Function pointers (type 130)
function_ptr (a long integer,(see funptr))
function_name_code (6 long integers,see the Remarks section below);
Remarks
Numbers (long interger, short integers, double) are stored using the little endian convention.
The variable names are stored as a sequence of 6 long integers, with a specific encoding. see the cvname.f file for details.
See Also
Authors
- compiled by Enrico Segre
<< rmdir | Arquivos : funções de Entrada/Saída | scanf >> |