OpenMathDevice¶
omdev.spad line 41 [edit on github]
OpenMathDevice provides support for reading and writing openMath objects to files, strings etc. It also provides access to low-level operations from within the interpreter.
- OMclose: % -> Void
OMclose(dev)
closesdev
, flushing output if necessary.
- OMgetApp: % -> Void
OMgetApp(dev)
reads a begin application token fromdev
.
- OMgetAtp: % -> Void
OMgetAtp(dev)
reads a begin attribute pair token fromdev
.
- OMgetAttr: % -> Void
OMgetAttr(dev)
reads a begin attribute token fromdev
.
- OMgetBind: % -> Void
OMgetBind(dev)
reads a begin binder token fromdev
.
- OMgetBVar: % -> Void
OMgetBVar(dev)
reads a begin bound variable list token fromdev
.
- OMgetEndApp: % -> Void
OMgetEndApp(dev)
reads an end application token fromdev
.
- OMgetEndAtp: % -> Void
OMgetEndAtp(dev)
reads an end attribute pair token fromdev
.
- OMgetEndAttr: % -> Void
OMgetEndAttr(dev)
reads an end attribute token fromdev
.
- OMgetEndBind: % -> Void
OMgetEndBind(dev)
reads an end binder token fromdev
.
- OMgetEndBVar: % -> Void
OMgetEndBVar(dev)
reads an end bound variable list token fromdev
.
- OMgetEndError: % -> Void
OMgetEndError(dev)
reads an end error token fromdev
.
- OMgetEndObject: % -> Void
OMgetEndObject(dev)
reads an end object token fromdev
.
- OMgetError: % -> Void
OMgetError(dev)
reads a begin error token fromdev
.
- OMgetFloat: % -> DoubleFloat
OMgetFloat(dev)
reads a float fromdev
.
- OMgetInteger: % -> Integer
OMgetInteger(dev)
reads an integer fromdev
.
- OMgetObject: % -> Void
OMgetObject(dev)
reads a begin object token fromdev
.
- OMgetString: % -> String
OMgetString(dev)
reads a string fromdev
.
- OMgetType: % -> Symbol
OMgetType(dev)
returns the type of the next object ondev
.
- OMgetVariable: % -> Symbol
OMgetVariable(dev)
reads a variable fromdev
.
- OMopenFile: (String, String, OpenMathEncoding) -> %
OMopenFile(f, mode, enc)
opens filef
for reading or writing OpenMath objects (depending onmode
which can be"r"
,"w"
or “a” for read, write and append respectively), in the encodingenc
.
- OMopenString: (String, OpenMathEncoding) -> %
OMopenString(s, mode)
opens the strings
for reading or writing OpenMath objects in encodingenc
.
- OMputApp: % -> Void
OMputApp(dev)
writes a begin application token todev
.
- OMputAtp: % -> Void
OMputAtp(dev)
writes a begin attribute pair token todev
.
- OMputAttr: % -> Void
OMputAttr(dev)
writes a begin attribute token todev
.
- OMputBind: % -> Void
OMputBind(dev)
writes a begin binder token todev
.
- OMputBVar: % -> Void
OMputBVar(dev)
writes a begin bound variable list token todev
.
- OMputEndApp: % -> Void
OMputEndApp(dev)
writes an end application token todev
.
- OMputEndAtp: % -> Void
OMputEndAtp(dev)
writes an end attribute pair token todev
.
- OMputEndAttr: % -> Void
OMputEndAttr(dev)
writes an end attribute token todev
.
- OMputEndBind: % -> Void
OMputEndBind(dev)
writes an end binder token todev
.
- OMputEndBVar: % -> Void
OMputEndBVar(dev)
writes an end bound variable list token todev
.
- OMputEndError: % -> Void
OMputEndError(dev)
writes an end error token todev
.
- OMputEndObject: % -> Void
OMputEndObject(dev)
writes an end object token todev
.
- OMputError: % -> Void
OMputError(dev)
writes a begin error token todev
.
- OMputFloat: (%, DoubleFloat) -> Void
OMputFloat(dev, i)
writes the floati
todev
.
- OMputObject: % -> Void
OMputObject(dev)
writes a begin object token todev
.
- OMputSymbol: (%, String, String) -> Void
OMputSymbol(dev, cd, s)
writes the symbols
fromCD
cd
todev
.
- OMsetEncoding: (%, OpenMathEncoding) -> Void
OMsetEncoding(dev, enc)
sets the encoding used for reading or writing OpenMath objects to or fromdev
toenc
.