Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
readLineCallBack - handle user input in OpenMaple
Calling Sequence
readLineCallBack(data, debug)
Parameters
data
-
user_data pointer passed to StartMaple (Long)
debug
indicates when readline has been called inside the debugger (boolean)
Description
This OpenMaple function is part of the MapleCallBack structure passed as an argument to StartMaple.
The readLineCallBack function is called when the kernel executes the Maple readline command (which is also used by readstat and history) to obtain a line of input from the user. In most applications, this is not used.
The prototype for the function that you can assign to the entry in the MapleCallBack must look like the following.
Function ReadLineCallBack(ByVal data As Long,
ByVal dbug As Long) as Long
The debug parameter indicates that the call to readline was made by the Maple debugger (the Maple debugger uses readline to get debugger commands from the user). If debug is TRUE, the readline call is from the debugger. If debug is FALSE, the readline call is from history, readstat, or another non-debugger call.
If no readLineCallBack function is provided, any attempt to execute the Maple readline function produces an error (reported using the errorCallBack or textCallBack).
The data parameter contains the same data as passed to StartMaple in the user_data parameter.
Examples
Function ReadLineCallBack(ByVal data As Long, ByVal dbug As Long) As Long
ReadLineCallBack = MapleStringToPointer(Form1.Text1.Text)
End Function
' assignment to MapleCallback entry
cb.lpReadLineCallBack = GetProc(AddressOf ReadLineCallBack)
' test statement that will invoke the ReadLineCallBack
EvalMapleStatement kv, "readline();"
See Also
callBackCallBack, errorCallBack, OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples, queryInterrupt, redirectCallBack, StartMaple, statusCallBack, streamCallBack, textCallBack
Download Help Document