´

objectwrite

synopsis: INT objectwrite(FILE *fp, OP a)

description:

stores the object a in the file pointed by fp. In general the format codes first the type of the object and then it stores the parts of the object. Further information is in the doc files for special objects. At the moment it works for the following types: BRUCH CYCLOTOMIC GRAL HOM_SYM INTEGER LIST LONGINT MATRIX MONOM MONOPOLY PARTITION PERMUTATION POLYNOM SKEWPARTITION SCHUBERT SCHUR SYMCHAR SQ_RADICAL TABLEAUX VECTOR INTEGERVECTOR, BITVECTOR There is an error message in the case of fp == NULL.

bugs:

not yet implemented for all types

example:

#include "def.h"
#include "macro.h"

 main()
 {
 OP a,b;
 FILE *fp1,*fp2;
 anfang();

 a=callocobject(); b=callocobject();
 scan(scanobjectkind(),a);

 fp1=fopen("klo.dat","w"); objectwrite(fp1,a); fclose(fp1);
 fp1=fopen("klo.dat","r"); objectread(fp1,b); fclose(fp1);
 println(b);
 freeall(a); freeall(b);
 ende();
 }


Send comments or suggestions to:
symmetrica (at) symmetrica.de

this page was automatically generated on So Jan 4 10:35:22 CET 2009 on the machine btn6xf

University of Bayreuth -