PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Lists the variables found in the MATLAB session.
Versions 24 and later
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
New in version 24
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
WEBDEV - Server codeWindows This function is now available for WEBDEV sites in Windows.
Example
gnIdSession is int
gnIdSession = mlInitialize()
 
IF gnIdSession = -1 THEN
Error(ErrorInfo(errFullDetails))
END
 
// Code du bouton BTN_ListeVariable
sListeVar is string = mlListVariable(gnIdSession)
 
SAI_Résultat = sListeVar
gnIdSession is int
gnIdSession = mlInitialize()
 
IF gnIdSession = -1 THEN
Error(ErrorInfo(errFullDetails))
END
 
// Code du bouton BTN_Creation_Variables
tParamètre is array of 1 real = [4]
tRésultat is array  of 1 by 1 real = [[123]]
 
IF NOT mlSetVariable(gnIdSession, "i", tParamètre) THEN
Error("Echec d'écriture de la variable")
RETURN
END
 
sCodeAExécuter is string = "maRac = sqrt(i)"
SAI_Résultat = mlExécute(gnIdSession, sCodeAExécuter)
 
tRésultat = mlGetVariable(gnIdSession, "maRac")
IF ErrorOccurred THEN
Trace("Erreur: " + ErrorInfo())
END
 
Trace("Racine = " + tRésultat[1,1])
 
Trace("Liste des variables avant suppression: " + mlListVariable(gnIdSession))
 
mlDeleteVariable(gnIdSession, "i")
mlDeleteVariable(gnIdSession, "maRac")
 
Trace("Liste des variables après suppression: " + mlListVariable(gnIdSession))
Syntax
<Result> = mlListVariable(<Session identifier>)
<Result>: Character string
List of variables found in the MATLAB session. The variables are separated by a CR character (Carriage Return).
<Session identifier>: Integer
Identifier of MATLAB session. This identifier is returned by the mlInitialize function.
Component: wd260com.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment