MPE/iX Shell and Utilities Reference Manual, Vol 1

bc(1) MPE/iX Shell and Utilities bc(1)
"string"
is a string constant. When bc sees a statement with this format, it displays the contents
of the string. For example,
"Hello world!"
tells bc to display Hello world! A newline character is not output after the string.
This makes it possible to do things like
foo=15
"The value of foo is "; foo
With these instructions, bc displays
The value of foo is 15
statement ; statement ...
is a sequence of statements on the same line. In bc, a semicolon (;) is equivalent to a
newline. They both indicate the end of a statement. bc performs these statements from
left to right.
{statement}
is a brace-bracketed statement. Brace brackets are used to group sequences of state-
ments together, as in
{
statement
statement
...
}
Brace brackets can group a series of statements which are split over several lines. They
are usually used with control statements like if and while.
break
can only be used inside a while or for loop. break terminates the loop.
for (initexp ; relation ; endexp) statement
is equivalent to
initexp
while (relation){
statement
endexp
}
Commands and Utilities 1-53