Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
queryInterrupt - interrupt a computation in OpenMaple
Calling Sequence
queryInterrupt(data)
Parameters
data
-
user_data pointer passed to StartMaple ()
Description
This OpenMaple function is part of the MapleCallBack structure passed as an argument to StartMaple.
The queryInterrupt function allows the user to halt computation. This function is called before each Maple statement is executed. In general, this occurs hundreds of times per second. For some operations (notably large integer manipulations), the queryInterrupt function is called only every few seconds.
The prototype for the function that you can assign to the entry in the MapleCallBack must look like the following.
Function QueryInterrupt(ByVal data As Long) As Long
To halt the computation, the function must return True. To continue the computation, the function must return False.
The data parameter contains the same data as passed to StartMaple in the user_data parameter.
Examples
Public ShouldStop As Boolean
ShouldStop = False
Public Function QueryInterrupt(ByVal data As Long) As Long
If ShouldStop Then
MainForm.StopButton.Caption = "Stop"
QueryInterrupt = True
Else
QueryInterrupt = False
End If
End Function
Private Sub StopButton_Click()
If Screen.MousePointer = vbHourglass Then
ShouldStop = True
StopButton.Caption = "Stopping ..."
End Sub
' assignment to MapleCallback entry
cb.lpQueryInterrupt = GetProc(AddressOf QueryInterrupt)
' test statement that will invoke the CallBackCallBack
EvalMapleStatement kv, "do end do;" 'infinite loop
See Also
callBackCallBack, errorCallBack, OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples, readLineCallBack, redirectCallBack, StartMaple, statusCallBack, streamCallBack, textCallBack
Download Help Document