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) closes dev, flushing output if necessary.

OMgetApp: % -> Void

OMgetApp(dev) reads a begin application token from dev.

OMgetAtp: % -> Void

OMgetAtp(dev) reads a begin attribute pair token from dev.

OMgetAttr: % -> Void

OMgetAttr(dev) reads a begin attribute token from dev.

OMgetBind: % -> Void

OMgetBind(dev) reads a begin binder token from dev.

OMgetBVar: % -> Void

OMgetBVar(dev) reads a begin bound variable list token from dev.

OMgetEndApp: % -> Void

OMgetEndApp(dev) reads an end application token from dev.

OMgetEndAtp: % -> Void

OMgetEndAtp(dev) reads an end attribute pair token from dev.

OMgetEndAttr: % -> Void

OMgetEndAttr(dev) reads an end attribute token from dev.

OMgetEndBind: % -> Void

OMgetEndBind(dev) reads an end binder token from dev.

OMgetEndBVar: % -> Void

OMgetEndBVar(dev) reads an end bound variable list token from dev.

OMgetEndError: % -> Void

OMgetEndError(dev) reads an end error token from dev.

OMgetEndObject: % -> Void

OMgetEndObject(dev) reads an end object token from dev.

OMgetError: % -> Void

OMgetError(dev) reads a begin error token from dev.

OMgetFloat: % -> DoubleFloat

OMgetFloat(dev) reads a float from dev.

OMgetInteger: % -> Integer

OMgetInteger(dev) reads an integer from dev.

OMgetObject: % -> Void

OMgetObject(dev) reads a begin object token from dev.

OMgetString: % -> String

OMgetString(dev) reads a string from dev.

OMgetSymbol: % -> Record(cd: String, name: String)

OMgetSymbol(dev) reads a symbol from dev.

OMgetType: % -> Symbol

OMgetType(dev) returns the type of the next object on dev.

OMgetVariable: % -> Symbol

OMgetVariable(dev) reads a variable from dev.

OMopenFile: (String, String, OpenMathEncoding) -> %

OMopenFile(f, mode, enc) opens file f for reading or writing OpenMath objects (depending on mode which can be "r", "w" or “a” for read, write and append respectively), in the encoding enc.

OMopenString: (String, OpenMathEncoding) -> %

OMopenString(s, mode) opens the string s for reading or writing OpenMath objects in encoding enc.

OMputApp: % -> Void

OMputApp(dev) writes a begin application token to dev.

OMputAtp: % -> Void

OMputAtp(dev) writes a begin attribute pair token to dev.

OMputAttr: % -> Void

OMputAttr(dev) writes a begin attribute token to dev.

OMputBind: % -> Void

OMputBind(dev) writes a begin binder token to dev.

OMputBVar: % -> Void

OMputBVar(dev) writes a begin bound variable list token to dev.

OMputEndApp: % -> Void

OMputEndApp(dev) writes an end application token to dev.

OMputEndAtp: % -> Void

OMputEndAtp(dev) writes an end attribute pair token to dev.

OMputEndAttr: % -> Void

OMputEndAttr(dev) writes an end attribute token to dev.

OMputEndBind: % -> Void

OMputEndBind(dev) writes an end binder token to dev.

OMputEndBVar: % -> Void

OMputEndBVar(dev) writes an end bound variable list token to dev.

OMputEndError: % -> Void

OMputEndError(dev) writes an end error token to dev.

OMputEndObject: % -> Void

OMputEndObject(dev) writes an end object token to dev.

OMputError: % -> Void

OMputError(dev) writes a begin error token to dev.

OMputFloat: (%, DoubleFloat) -> Void

OMputFloat(dev, i) writes the float i to dev.

OMputInteger: (%, Integer) -> Void

OMputInteger(dev, i) writes the integer i to dev.

OMputObject: % -> Void

OMputObject(dev) writes a begin object token to dev.

OMputString: (%, String) -> Void

OMputString(dev, i) writes the string i to dev.

OMputSymbol: (%, String, String) -> Void

OMputSymbol(dev, cd, s) writes the symbol s from CD cd to dev.

OMputVariable: (%, Symbol) -> Void

OMputVariable(dev, i) writes the variable i to dev.

OMsetEncoding: (%, OpenMathEncoding) -> Void

OMsetEncoding(dev, enc) sets the encoding used for reading or writing OpenMath objects to or from dev to enc.