Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Evaluates an expression for each cell.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Matrix | 10.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
MatrixRef | The matrix reference number. | $matrix | |
Expression | The expression to evaluate. Can include "row", "column" and "current" as variables. |
"current +1" | |
firstRow | The index of first row. Default is 0. |
0 | Optional |
lastRow | The index of last row. Default is Matrix.Height-1. |
5 | Optional |
firstCol | The index of first column. Default is 0. |
0 | Optional |
lastCol | The index of last column. Default is Matrix.Width-1. |
6 | Optional |
ReadOnly | Pass 1 to ignore results of expressions and not put them back in matrix. | 0 | Optional |
Returns OK or error.
Try evaluate:
Set Variable [ $matrix ; Value: MBS("Matrix.New"; 5; 6) ]
# set values
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 0; "Joe¶Miller¶New York¶123") ]
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 1; "Bob¶Jones¶Washington¶234") ]
Set Variable [ $r ; Value: MBS("Matrix.SetRow"; $matrix; 2; "Jane¶Stones¶Los Angeles¶567") ]
# add one to all by expression
Set Variable [ $r ; Value: MBS("Matrix.Evaluate"; $matrix; "current + 1"; 0; 2; 3; 3) ]
# show numbers
Show Custom Dialog [ "Values" ; MBS("Matrix.GetColumn"; $matrix; 3) ]
Set Variable [ $r ; Value: MBS("Matrix.Release"; $matrix) ]
Set each cell to the value and row/column:
Set Variable [ $r ; Value: MBS("Matrix.Evaluate"; $matrix; "current & \" \" & row & \" \" & column"; 0; 3; 3; 3) ]
This function checks for a license.
Created 2nd April 2020, last changed 7th April 2022