Before Beginning BML
Overview
There are some things to be aware of before attempting to use BML.
Select the question mark in the toolbar above the Script Definition Area, to see the following menu of commands:
Shortcut | What does it do? |
---|---|
Tab | Add tabulation to text |
Shift + Tab | Remove tabulation from text |
CTRL + F | Search next/open search area |
CTRL + R | Replace/Open search area |
CTRL + H |
Toggle syntax highlight on/off |
CTRL + G | Go to line |
CTRL + Z | Undo |
CTRL + Y | Redo |
CTRL + E | About |
CTRL + Q | Close pop-up |
Access Key E | Toggle editor < |
You will see some standard syntax throughout the function editor:
function(param 1, param 2, param 3, [optional param])
Example: substring(str, start, [end])
Parameter | Data Type | Definition |
---|---|---|
str | String | This is the given string for... |
start | Integer | This represents the index... |
[end] | Integer | This represents the index... |
Operator | Looks Like |
---|---|
equals |
== 12 == 12 "string" == "string" true == true |
not equal |
<> 12 <> 13 "string" <> "abc" true <> false |
less than |
< 12 < 13 "13" < "14" |
greater than |
> 12 > 13 "13" > "14" |
less than or equal to |
<= number <= number string <= string |
greater than or equal to |
>= number >= number string >= string |
and not or |
<boolean> and <boolean> <boolean> not <boolean> <boolean> or <boolean> |
Numeric operators always return a numeric data type. Numeric inputs include: numeric literals, numeric identifiers, and numeric functions. Numeric operators can also be used whether a numeric value can be plugged in or not, such as: in other functions, relational operators, and expressions. For more information, see the topic Numeric Functions.
Numeric Operator | Meaning | Looks Like |
---|---|---|
+ | Addition | 12 + 12 |
- | Subtraction | 15 - 12 |
* | Multiplication | 15 * 12 |
/ | Division | 15 / 12 |
% | Modulus | <number> % <number> |
Example:
sqrt(45 + 45)
(3 * 3) + (4 * 4)
(3 + 4) == (4 + 3)
There is one string operator that can be used to return a string as an output. The string operator for concatenation is + and its formation is:
<string> + <string>
Literals can be added to scripts when following these conventions:
Literal | Data Type | Examples |
---|---|---|
Integer | Numeric | 12345 |
Floating point number | Numeric |
123.45 12345 .345 |
String | String |
"volume" "23 psi" "100" |
True | Boolean | True |
False | Boolean | False |