Symbols

Prev Next

Overview of B4P Symbos

B4P makes use of the following symbols:

Symbols Description Explanation
{ } Braces Specify program blocks
Put values into parameter sets
Indexing strings and indexing parameter sets
slicing strings and slicing parameter sets
( ) Parentheses Used for calculations where contents inside parentheses are calculated first, and describe function parameters
[ ] Brackets Specify variables: Opening bracket follows after the variable name, where further hierarchical member names and array indexes can be specified
Specify table references: Tables do always begin with brackets
, Comma Separates elements in parameter sets, values in function parameters, etc.
; Semicolon Concludes and separates statements
+ - * / Arithmetic operators Used as binary operators, and some as unary and assignment operators
& | ! Logical operators Used as binary operators, and some as unary and assignment operators
< <= == >= > != Comparison operators Compares one value at the left-hand side of this symbol with exactly one value at the right-hand side
= < >: Comparison operators Compares one value at the left-hand side with a selection of multiple values or value ranges at the right-hand side
= Assignment symbol Inside statements, equal signs are interpreted as assignment symbols.
Example: a[] = b[] = c[]
First equal sign is the assignment symbol. The 2nd equal sign compares two variables for being equal.
.. Range Used for slicing strings, slicing parameter sets, and specifying value ranges
~ Other operators Used as unary operators
++ -- ** Ad-hoc operators Used to increment, decrement and scale variables and table entries
: Colon Separates else from subsequent statement
Repeat operator for parameter set elements
Instructs to access multiple table entries
^ Deep prefix/postfix symbol Use as deep operators, variable references, nested partial table specifications, and in transactions to skip the base variables.
/* */ // Comments These symbols designate comments inbetween or following till end of line
<== <<= <=> Transaction operators Used for transactions

Various symbols can be combined, for example for the assignment operator += to add the calculated result of an expression to the destination.

Note: The single point (.) is interpreted as part of a number (decimal point) if the whole item constitutes a legitimate number, or part of a text. Inside table references, single points, as long they are not in double quotation marks, may refer to current columns if a table context for partial table specifications with column informaiton is provided.