You are here: Using BML > BML Overview

BML Overview

OVERVIEW

BML (BigMachines Extensible Language) is a scripting tool that is used to capture a company's complex business logic within CPQ Cloud Configuration and Commerce. BML is based of many different programming languages.

You will see syntax that is familiar in Java, Basic, Python, and C++, but they aren’t exactly the same. After reading the section on BML, you should have a good understanding of what programming language is and how it’s used and structured. You should also understand the syntax of BML and have generated some very basic and functional code.

ClosedWhat is a function?

A function is usually defined as a rule that relates one variable value to another. In programming, it also represents a series of commands that perform an action or calculate a value depending upon certain parameters. Parameters are the values that the function uses. But, not all functions require parameters. For more information, see Function Editor Basics.


ClosedWhat is a variable?

Variables are placeholders for the data, which a program may use or manipulate. They are given unique names so that they can be assigned values and referred to throughout the source code. In order to use a variable, you must declare it by giving it a unique name. In many programming languages, once a variable is declared, it must be initialized. However, in BML, these two steps occur simultaneously.

Variables can be used for Column names, Table names, and WHERE clauses. For more information, see Dynamic BMQL Variables.


ADMINISTRATION

ClosedProgramming Language

A programming language is an artificial language that is used to write instructions that a computer can understand. Programming languages can be broken down into two groups:

1. Compiled programming: this is a language that must be converted into machine language, after it’s been written by the programmer, so that a computer can understand and execute the instructions. These languages require the use of special software (called a compiler) prior to being executed.

2. Interpretive programming: this language do not have to be compiled. The computer understands and executes the instructions while the program is running. See examples below.


ClosedProgramming Structure

BML follows the Structured computer programming model (not Object-Oriented model). Structured programming uses blocks of code that are executed one after the other. They include control statements which dictate the flow, or when these statements are executed. Almost all structured programming, including BML, shares a similar overall structure. They include:


ClosedBasic Data Types

Almost all programming languages include the use of data types. A data type determines the values that a variable can contain and how it is executed. A data type also represents a constraint placed on the interpretation of data. There are four basic data types:


ClosedCommon Statement Elements

You may also see the element return "";. This will return an empty String if there isn’t anything to return. It will only return a String (signified by double quotation marks), not an Integer, Float, Boolean, or Array.


ClosedBasic BML Syntax

The basic structure includes statements that comprise the source code and ends with a return statement. The example below shows variables, print statements, and a return statement.


NOTES

RELATED TOPICS

Related Topics Link IconSee Also