## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### Expected Return Strings

Many MMPM/2 commands return strings. It is possible to check these strings against an expected value with an expected return string line.

An expected return string line has the format:

    =result

The equal sign (=) must be in column 1 and should have no trailing spaces. If an empty string is expected, nothing should follow the = (not even spaces). For example:

    status cdaudio ready wait

    =TRUE

    status cdaudio mode wait

    =stopped

The expected result is always interpreted as a string. This might produce some unusual outputs for commands that return binary data.

Where the return is a textual numerical value, it can be matched to a tolerance range of +/-10% using a tilde (~) before the number. This is typically used when the exact value cannot be known. For example:

    set foo time format milliseconds wait

    play foo notify

    @PAUSE 1000

    stop foo wait

    status foo position wait

    =~1000

Thus, the status command is considered successful if the returned string is in the range 900 - 1100.