Skip to content

class MpResult

The return value of execute and finish is a table with a few possible keys (only status is always guaranteed to be present).

Reference:

😱 Types incomplete or incorrect? 🙏 Please contribute!


fields


MpResult.log


MpResult.log : string?

The output to the “log” stream.

MpResult.term


MpResult.term : string?

The output to the “term” stream.

MpResult.error


MpResult.error : string?

The output to the “error” stream (only used for “out of memory”).

MpResult.status


MpResult.status : MpResultStatus

The return value: 0 = good, 1 = warning, 2 = errors, 3 = fatal error.

MpResult.fig


MpResult.fig : MpFig[]?

An array of generated figures (if any).

When status equals 3, you should stop using this MPlib instance immediately, it is no longer capable of processing input.

If it is present, each of the entries in the fig array is a userdata representing a figure object, and each of those has a number of object methods you can call: