Introduction
Basic rules to subtractions:
- Numbers are multiplied with each other as learned in business school (probably a bit too late).
- Boolean values are converted to 0 and 1 first.
- Sets: They can be multiplied with numbers in order to repeat the elements.
- Special rules apply to some operations with different data types. See the table below for details.
a[0] = 5 * 3;
a[1] = '' * 10; // Blank = 0
a[2] = 0.5 * true;
a[3] = { a, b, c } * 3; // Repetition
a[4] = { a, b, c } * 0; // Empty set
for all variables( a[], b[] ) echo( b[] );
15
0
0.5
{'a','b','c','a','b','c','a','b','c'}
{}
Try it yourself: Open
LAN_Features_multiplication.b4p in
B4P_Examples.zip. Decompress before use.