MQL language

Overview

The MQL language interface consists of three functions, each of which differs from the others only in the kind of input it takes:

  • mql_execute_file takes the name of a file
  • mql_execute_stream takes a descendant of std::istream
  • mql_execute_string takes a std::string

Arguments

The following are the other arguments, common to them all:

  • pEE is the execution environment.
  • bResult& is a boolean reference returning true on success and false on error.
  • bPrintResult is a boolean indicating whether the results should be dumped using the CEMdFOutput object in the execution environment (true) or not (false). Set this to false if you plan to use the pStatement of the execution environment for getting the results.
  • bReportError is a boolean indicating whether any error message should be reported using the CEMdFOutput object in the execution environment. This only has an effect if the output kind is kOKConsole, since any error message is always given in the XML output.

C++ interface


#include <emdros/mql_execute.h>

extern bool mql_execute_file(CMQL_execution_environment *pEE, 
                             std::string filename, 
                             bool{PREAMP} bResult, 
                             bool bPrintResult, 
                             bool bReportError);

extern bool mql_execute_stream(CMQL_execution_environment *pEE, 
                               std::istream{PREAMP} strin, 
                               bool{PREAMP} bResult, 
                               bool bPrintResult, 
                               bool bReportError);

extern bool mql_execute_string(CMQL_execution_environment *pEE, 
                               const std::string{PREAMP} input, 
                               bool{PREAMP} bResult, 
                               bool bPrintResult, 
                               bool bReportError);


Previous:MQL Error
Up:Part II: APIs
Next:Monads