- Aide Scilab
- Entrées/Sorties [fichiers]
- Répertoire
- Chemins - nom de fichiers
- copyfile
- deletefile
- dispfiles
- fileinfo
- findfiles
- fprintf
- fprintfMat
- fscanf
- fscanfMat
- getmd5
- %io
- isfile
- listfiles
- listvarinfile
- maxfiles
- mclearerr
- mclose
- mdelete
- meof
- merror
- mfprintf
- mfscanf
- mget
- mgetl
- mgetstr
- mopen
- movefile
- mput
- mputl
- mputstr
- mseek
- mtell
- newest
- save_format
- scanf
- scanf_conversion
- sscanf
Please note that the recommended version of Scilab is 2026.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_sizem(a long integer),column_sizen(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 polynomial used for indexing (type 129)
row_sizem(a long integer),column_sizen(a long integer),real/complex flag
it(a long integer in{0,1}),formal variable name (16 bytes),
index_table(m*n+1long integers),data (
(N-1)*(it+1)doubles), whereNis the value of the last entry of theindex_table.
- Booleans (type 4)
row_sizem(a long integer),column_sizen(a long integer),data (
n*mlong integers).
- Floating sparse matrices (type 5)
row_sizem(a long integer),column_sizen(a long integer),real/complex_flag
it(a long integer in{0,1}),total_number_of_non_zero_elementsnel(a long integer),number_of_non_zero_elements_per_row(mlong integers),column_index_non_zero_elements(nellong integers),non_zero_values(nel*(it+1)doubles).
- Boolean sparse matrices (type 6)
row_sizem(a long integer),column_sizen(a long integer),unused
it(a long integer),total_number_of_non_zero_elementsnel(a long integer),number_of_non_zero_elements_per_row(mlong integers),column_index_non_zero_elements(nellong integers).
- Matlab sparse matrix (type 7)
row_sizem(a long integer),column_sizen(a long integer),real/complex_flag
it(a long integer in{0,1}),total_number_of_non_zero_elementsnel(a long integer),number_of_non_zero_elements_per_column(nlong integers),row_index_non_zero_elements(nellong integers),non_zero_values(nel*(it+1)doubles).
- Integer matrices (type 8)
row_sizem(a long integer),column_sizen(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*mbytes forinteger_type1 or 11,n*mshort integers forinteger_type2 or 12,n*mlong integers forinteger_type4 or 14).
- handles (type 9)
version (4 bytes)
row_sizem(a byte),column_sizen(a byte),data (
m*nserialization_records)A
serialization_recordis 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_recordof a graphic object is structured as follow.- serialization_record
type_lengthn(a byte),type(nbytes, the ascii codes of the type name),property_valuesrecord (variable length).
- Strings (type 10)
row_sizem(a long integer),column_sizen(a long integer),index_table(n*m+1long integers),data (
Nlong integers, the Scilab encoding of the characters (see code2str), whereNis the value of the last entry of theindex_table.
- Uncompiled functions (type 11)
nout(a long integer),lhs_names(6*noutlong integers, see the Remarks section below),nin(a long integer),rhs_names(6*ninlong integers, see the Remarks section below),code_lengthN(a long integer),code(Nlong integers).
- Compiled functions (type 13)
nout(a long integer),lhs_names(6*noutlong integers, see the Remarks section below),nin(a long integer),rhs_names(6*ninlong integers, see the Remarks section below),pseudo_code_lengthN(a long integer),pseudo_code(Nlong integers).
- Libraries (type 14)
path_lengthnp(a long integer),path_name(nplong integers: the path character codes sequence, (see code2str)),number of names
nn(a long integer),names (
6*nnlong integers, see the Remarks section below).
- Lists (type 15), tlists (type 16), mlists (type 17)
number of fields
n(a long integer),index (
n+1long integers),variables_sequence(nvariables, 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 (a long interger, a short integer, a 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
- save — Save a variable or a serie of variables in a binary file
- load — Load a saved variable or a serie of variables
- listvarinfile — list of variables in a saved data file
- type — Retourne le type d'une variable
- typeof — object type
| Report an issue | ||
| << newest | Entrées/Sorties [fichiers] | scanf >> |