handle user input in OpenMaple - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : VB Application Programming Interface : Session State and Input-Output Functions : OpenMaple/VB/readLineCallBack

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

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam