Go to the first, previous, next, last section, table of contents.

### `bsave`, `bload`

`bsave(obj,"filename")`
  :: This function writes obj onto filename in binary form.
`bload("filename")`
  :: This function reads an expression from filename in binary form.

return
  `bsave()` : 1, `bload()` : the expression read
obj
  arbitrary expression which does not contain neither function forms nor unknown coefficients.
filename
  filename

- Function `bsave()` writes an object onto a file in its internal form (not exact internal form but very similar). Function `bload()` read the expression from files which is written by `bsave()`. Current implementation support arbitrary expressions, including lists, arrays (i.e., vectors and matrices), except for function forms and unknown coefficients (`vtype()` References.)
- The parser is activated to retrieve expressions written by `output()` , whereas internal forms are directly reconstructed by `bload()` from the `bsave()`'ed object in the file. The latter is much more efficient with respect to both time and space.
- It may happen that the variable ordering at reading is changed from that at writing. In such a case, the variable ordering in the internal expression is automatically rearranged according to the current variable ordering.
- On Windows one has to use ``/'` as the separator of directory names.

    [0] A=(x+y+z+u+v+w)^20$
    [1] bsave(A,"afo");
    1
    [2] B = bload("afo")$
    [3] A == B;
    1
    [4] X=(x+y)^2;
    x^2+2*y*x+y^2
    [5] bsave(X,"afo")$
    [6] quit;
    % asir
    [0] ord([y,x])$
    [1] bload("afo");
    y^2+2*x*y+x^2

`References`
  section `output`.

Go to the first, previous, next, last section, table of contents.