B programming language
B was the name of a programming language developed at Bell Labs. It is almost extinct, as it was replaced by the C language.
Example
The following example is from the Users' Reference to B by Ken Thompson:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
/* The following function will print a non-negative number, n, to
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
the base b, where 2
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
in the ANSCII character set, the digits O to 9 have sequential
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
code values. */
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
printn(n,b) {
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
extrn putchar;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
auto a;
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
if(a=n/b) /* assignment, not test for equality */
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
printn(a, b); /* recursive */
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
putchar(n%b + '0');
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
}
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | Example |
| ► | External links |
| ► | See also |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.