AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de valores numéricos / Funciones de matrices
  • 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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local