Expression language
The expression language used in block model columns and filters (Columns and filter). Names are not case-sensitive.
Built-in names
| Name | Meaning |
|---|---|
GRADE (TENOR) |
Block grade |
SG |
Block density |
X, Y, Z |
Block centre coordinates |
I, J, K |
Block indices |
FRACTION (ORAN) |
Fraction of the block inside the domain solid (0–1) |
VOLUME (HACIM) |
Block volume × fraction |
TONNES (TON) |
Volume × SG |
VARIANCE, SAMPLES, PASS |
Kriging variance, number of samples used, pass number |
| Model columns | e.g. LITO, Au, CuEq |
Names with spaces or special characters are written in square brackets: [Cu %]. Text is written in "double" or 'single' quotes.
Operators
| Type | Operators |
|---|---|
| Arithmetic | + - * / ^ % |
| Comparison | = <> < <= > >= (==, != also work) |
| Logic | and or not · ve veya değil · && || ! |
Functions
The argument separator is ; or ,.
| Function | Description |
|---|---|
if(condition; a; b) (eğer) |
a if the condition is true, otherwise b |
min(a; b; …), max(a; b; …) |
Minimum / maximum |
abs(x), sqrt(x), ln(x), log10(x), exp(x), pow(x; y) |
Mathematics |
round(x[; digits]), floor(x), ceil(x) |
Rounding |
isnull(x) (bos) |
True if there is no value |
nz(x; default) |
Default if there is no value |
between(x; a; b) (arasında) |
a ≤ x ≤ b |
in(x; a; b; …) (içinde) |
x is one of the list |
text(x) (metin) |
Converts a number to text |
Blocks without a value
A missing number is NaN: it propagates in arithmetic (the result is empty too) and comparisons are false. A missing text is the empty text. In a filter a block is shown if a numeric result is not NaN and not zero, or a text result is not empty.
Examples
CuEq = Cu + 0.6 * Au
CLASS = if(GRADE >= 0.5; "Ore"; if(GRADE >= 0.2; "Low grade"; "Waste"))
LITO = "Oxide" and Z > 850
nz(SG; 2.7) * VOLUME
in(LITO; "Oxide"; "Transition") and not isnull(GRADE)