PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Windows This function is now available for the WEBDEV sites in Windows.
New in version 24
Windows This function is now available for the WEBDEV sites in Windows.
Windows This function is now available for the WEBDEV sites in Windows.
Example
gnSessionID is int
gnSessionID = mlInitialize()

IF gnSessionID = -1 THEN
Error(ErrorInfo(errFullDetails))
END

// Code of BTN_ListVariables button
sVarList is string = mlListVariable(gnSessionID)

EDT_Result = sVarList
gnSessionID is int
gnSessionID = mlInitialize()

IF gnSessionID = -1 THEN
Error(ErrorInfo(errFullDetails))
END

// Code of BTN_Create_Variables button
aParameter is array of 1 real = [4]
aResult is array of 1 by 1 real = [[123]]

IF NOT mlSetVariable(gnSessionID, "i", aParameter) THEN
Error("Failure writing the variable")
RETURN
END

sCodeToRun is string = "myRoot = sqrt(i)"
EDT_Result = mlExecute(gnSessionID, sCodeToRun)

aResult = mlGetVariable(gnSessionID, "myRoot")
IF ErrorOccurred THEN
Trace("Error: " + ErrorInfo())
END

Trace("Root = " + aResult[1,1])

Trace("List of variables before deletion: " + mlListVariable(gnSessionID))

mlDeleteVariable(gnSessionID, "i")
mlDeleteVariable(gnSessionID, "myRoot")

Trace("List of variables after deletion: " + mlListVariable(gnSessionID))
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 mlInitialize.
Component : wd240com.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment