ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Numeric values functions / Matrix functions
  • Creating a matrix
MatCreate (Example)
Creating a matrix
The following code is used to create a matrix. The existence of the matrix is checked by MatExist before creating the matrix. The name of the matrix is entered by the user in an edit control (EDT_MatrixName).
// Declare the variables
ResExist is boolean
ResOverwrite is boolean
ResCreate is boolean
 
// Checks whether the matrix exists
ResExist = MatExist(EDT_MatrixName)
 
// The matrix exists
IF ResExist = True THEN
// Overwrite the matrix?
ResOverwrite = YesNo("This matrix already exists. Do you want to overwrite it?")
END
 
// The matrix does not exist or the existing matrix must be overwritten
IF ResExist = False OR ResOverwrite = True THEN
// Create the matrix
ResCreate = MatCreate(EDT_MatrixName)
END
 
// Error?
IF ResCreate = False THEN
// Display the error message
Error(ErrorInfo(errMessage))
ELSE
Info("The matrix was created")
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help