Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
textCallBack - handle text output in OpenMaple
Calling Sequence
textCallBack(data, tag, output)
Parameters
data
-
user_data pointer passed to StartMaple (void*)
tag
code indicating kind of text (int)
output
output string (char*)
Description
This OpenMaple function is part of the MCallBackVector structure passed as an argument to StartMaple.
The textCallBack function is called with typical (non-exceptional) Maple output. The output that Maple generates, for example, an intermediate result or the output from a printf statement, is passed to the textCallBack function.
The prototype for the function you can assign to the entry in the MCallBackVector must look like the following.
void M_DECL textCallBack( void *data, int tag, char *output );
The tag parameter indicates the type of Maple output. The tag parameter can take one of the following values (as defined in maplec.h).
MAPLE_TEXT_OUTPUT
A line-printed (1-D) Maple expression or statement.
MAPLE_TEXT_DIAG
Diagnostic output (high printlevel or trace output).
MAPLE_TEXT_MISC
Miscellaneous output, for example, from the Maple
printf function.
MAPLE_TEXT_HELP
Text help output. This is generated in response to a
help request. For a more comprehensive help
facility, see MapleHelp.
MAPLE_TEXT_QUIT
Response to a Maple quit, done, or stop command.
MAPLE_TEXT_WARNING
A warning message generated during a computation.
MAPLE_TEXT_ERROR
An error message generated during parsing or
processing. This is generated only if you
do not specify an errorCallBack function.
MAPLE_TEXT_STATUS
Kernel resource usage status (a "bytes used"
message). This is generated only if you
do not specify a statusCallBack function.
MAPLE_TEXT_DEBUG
Output from the Maple debugger.
The output parameter contains the output of the type indicated by the tag parameter. Each output string can be arbitrarily long. Most output obeys interface(screenwidth), which is initially set to infinity. Some output is not line-broken, including output generated by printf (which control its own formatting).
A single result may be split into multiple calls to the textCallBack function. In particular, this can happen when is not infinity. It is also true for formatted output like that generated by accessing help. A single command can generate many calls with different output tags.
The data parameter contains the same data as passed to StartMaple in the user_data parameter.
Source code for a textCallBack example is provided in the samples/OpenMaple/HelpExamples subdirectory of your Maple installation.
See Also
callBackCallBack, CustomWrapper, errorCallBack, interface, OpenMaple, OpenMaple/C/API, OpenMaple/C/Examples, queryInterrupt, readLineCallBack, redirectCallBack, StartMaple, statusCallBack, streamCallBack
Download Help Document